It is narrated from Sayyiduna Hakim bin Hizam (may Allah be pleased with him) that the Messenger of Allah (peace and blessings be upon him) said: "The prescribed punishments (hudud) are not to be carried out in the mosques, nor is retaliation (qisas) to be taken in them."
Hadith Referenceالمعجم الكبير للطبراني / باب الحاء / 3118