This has already passed under number 16930.
At the end of the hadith, add this: Then Allah revealed this verse: "O Messenger, let them not grieve you who hasten into disbelief" [Surah al-Ma'idah: 41]. They said: Go to Muhammad (peace and blessings be upon him); if he gives you the ruling of blackening the face and flogging, accept it, and if he says stoning, leave it. So these verses were revealed about them: "And whoever does not judge by what Allah has revealed, then it is they who are the disbelievers" [Surah al-Ma'idah: 44], "And whoever does not judge by what Allah has revealed, then it is they who are the wrongdoers" [Surah al-Ma'idah: 45] and "And whoever does not judge by what Allah has revealed, then it is they who are the defiantly disobedient" [Surah al-Ma'idah: 47]; and he said: All of these are about the disbelievers.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الحدود / 17118