The Messenger of Allah ﷺ forbade to take retaliation in the mosque, to recite verses in it and to inflict the prescribed punishments in it.
أَنَّهُ قَالَ نَهَى رَسُولُ اللَّهِ ﷺ أَنْ يُسْتَقَادَ فِي الْمَسْجِدِ وَأَنْ تُنْشَدَ فِيهِ الأَشْعَارُ وَأَنْ تُقَامَ فِيهِ الْحُدُودُ