Nafi' bin Jubayr (may Allah have mercy on him) narrates from his father, Sayyiduna Jubayr bin Mut'im (may Allah be pleased with him), who said: the Messenger of Allah (peace and blessings be upon him) said: "The prescribed punishments (hudud) are not to be carried out in the mosques."
Hadith Referenceالمعجم الكبير للطبراني / باب الجيم / 1577