Ibn 'Abbas (RAA) narrated that the Messenger of Allah (ﷺ) said:
"Prescribed punishments are not to be inflicted in mosques." Related by At-Tirmidhi and Al-Hakim. (JA)
English reference (JA): Book 10, Hadith 1284 (JA)
Arabic reference (JA): Book 10, Hadith 1245 (JA)