The Messenger of Allah ﷺ forbade to take retaliation in the mosque, to recite verses in it and to inflict the prescribed punishments in it. (Using translation from Abū Dāʾūd 4490)
نَهَى رَسُولُ اللهِ ﷺ أَنْ يُسْتَقَادَ فِي الْمَسَاجِدِ وَأَنْ يُنْشَدَ فِيهَا الْأَشْعَارُ أَوْ تُقَامَ فِيهَا الْحُدُودُ