The Messenger of Allah ﷺ forbade carrying out retaliation in the mosque, reciting poetry in it, and applying legal punishments within it.
حدثنا هشام بن عمار حدثنا صدقة يعني ابن خالد حدثنا الشعيثي عن زفر بن وثيمة
نهى رسول الله ﷺ أن يستقاد في المسجد وأن تنشد فيه الأشعار وأن تقام فيه الحدود
No references are available.
[Its chain of transmission is daif] Ahmad recorded it (3/434) from the hadith of Shabi, with the same wording, as a mawquf report. The hadith has corroborating narrations (shawahid) in Ibn Majah, no. 2599, and elsewhere. However, there is doubt about another hearing transmitted from Hakeem .