The judge will decide the case on the basis of the defendant’s confession, or the testimony of two men, or the testimony of one man and two women.
It is narrated from Abu Hurayrah (may Allah be pleased with him) and Zayd ibn Khalid al-Juhani (may Allah be pleased with him) that the Messenger of Allah ﷺ said:
وافد يا أنيس إلى امرأة هذا فإن اعترفت فارجمها
“O Unays! Go to this man’s wife in the morning, and if she confesses (to adultery), then stone her.”
[Sahih al-Bukhari: 2696, 2695, Sunan Abi Dawud: 4445, Jami’ al-Tirmidhi: 1433, Sunan al-Nasa’i: 240/8, Sunan Ibn Majah: 2549, Musnad Ahmad: 115/4, Musnad al-Humaydi: 811]
When stoning can be carried out on the basis of a confession, then a ruling lighter than stoning is all the more valid.
Allah the Exalted says:
وَاسْتَشْهِدُوا شَهِيدَيْنِ مِن رِّجَالِكُمْ ۖ فَإِن لَّمْ يَكُونَا رَجُلَيْنِ فَرَجُلٌ وَامْرَأَتَانِ مِمَّن تَرْضَوْنَ مِنَ الشُّهَدَاءِ [Al-Baqarah: 282]
“Call two of your men to bear witness, and if there are not two men, then one man and two women, from those whom you approve as witnesses.”