Hadith 7166

حَدَّثَنَا يَحْيَى ، حَدَّثَنَا عَبْدُ الرَّزَّاقِ ، أَخْبَرَنَا ابْنُ جُرَيْجٍ ، أَخْبَرَنِي ابْنُ شِهَابٍ ، عَنْ سَهْلٍ أَخِي بَنِي سَاعِدَةَ ، أَنَّ رَجُلًا مِنَ الْأَنْصَارِ جَاءَ إِلَى النَّبِيِّ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ ، فَقَالَ : " أَرَأَيْتَ رَجُلًا وَجَدَ مَعَ امْرَأَتِهِ رَجُلًا أَيَقْتُلُهُ ؟ ، فَتَلَاعَنَا فِي الْمَسْجِدِ وَأَنَا شَاهِدٌ .
Narrated Sahl: (the brother of Bani Sa`ida) A man from the Ansar came to the Prophet and said, "If a man finds another man sleeping with his wife, should he kill him?" That man and his wife then did Lian in the mosque while I was present.
Hadith Reference صحيح البخاري / كتاب الأحكام / 7166
Hadith Grading محدثین: أحاديث صحيح البخاريّ كلّها صحيحة
Explanation & Benefits
Shaykh Abdul Sattar al-Hammad
Hadith Commentary:

Sitting in the mosque to make judgments is better than sitting at home, because various kinds of obstacles may arise for those coming and going in the home, whereas the situation of the mosque is different. There, anyone can come and go. However, some scholars hold the view that a place outside the mosque should be chosen for making judgments, because it is not permissible for a polytheist or a menstruating woman to enter the mosque, while they too may need to come for a judgment.

According to our inclination, a separate room should be constructed within the mosque’s premises for this purpose, where the judge (qadi) can sit to make judgments among the people, so that all kinds of people have the facility to come and go there. Furthermore, this also highlights the aspect of humility and modesty.
And Allah knows best.
Source: Hidayat al-Qari: Commentary on Sahih Bukhari, Urdu, Page: 7166