عَنْ حَكِيمِ بْنِ حِزَامٍ رَضِيَ اللَّهُ عَنْهُ قَالَ: قَالَ رَسُولُ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَآلِهِ وَسَلَّمَ: ((لَا تُقَامُ الْحُدُودُ فِي الْمَسَاجِدِ وَلَا يُسْتَقَادُ فِيهَا)) (زَادَ فِي رِوَايَةٍ غَيْرِ مَرْفُوعَةٍ: وَلَا يُنْشَدُ فِيهَا الْأَشْعَارُ)
Sayyiduna Hakim bin Hizam (may Allah be pleased with him) narrates that the Messenger of Allah (peace and blessings be upon him) said: Neither should the legal punishments (hudood) be carried out in the mosques, nor should retribution (qisas) be taken. And in a non-marfu’ narration, there are these additional words: Nor should poetry be recited in them.