Sahih al-Bukhari 2695
Adam (bin Abi Iyas) told us. Ibn Abi Dhi'b narrated to us that Zuhri told us. He narrated from Ubaidullah bin Abdullah, he from Hazrat Abu Hurairah and Hazrat Zaid bin Khalid Juhani (ra), that they both said: A Bedouin came and said: O Messenger of Allah (saw)! Judge between us according to the Book of Allah. His opponent stood up and said: He has spoken the truth; judge between us according to the Book of Allah. The Bedouin said: My son was a servant with this man. He committed adultery with his wife. People said to me: Your son must be stoned. I have ransomed my son by giving him a hundred goats and a slave girl. Then after that I asked the people of knowledge, and they said: Your son was only to receive a hundred lashes and exile for one year. The Prophet (saw) said: “I will judge between you only by the Book of Allah. As for the slave girl and the goats, they are to be returned to you, and your son is to be given a hundred lashes and exiled for one year.” And to a man (he said): “Unais (ra) (bin Dahhak)! Go in the morning to the wife of this man and stone her.” So Unais (ra) went to that woman in the morning and stoned her.
AI-translated by Islam-Today
Book 5: If some people are (re)conciled on illegal basis, their reconciliation is rejected