The Prophet (peace and blessings be upon him) forbade carrying out the lashes of a prescribed punishment (hadd) in the mosques.