Nafi' (may Allah have mercy on him) said: A woman gave her husband one of her slave-girls as a gift. He took her with him on a journey and had intercourse with her, and she became pregnant. When the woman learned of her pregnancy, she came to Sayyiduna Umar (may Allah be pleased with him) and said: I gave my slave-girl to my husband for service, and I have learned that he has made her pregnant. When the man returned, Sayyiduna Umar (may Allah be pleased with him) summoned him and asked: What did you do with such-and-such slave-girl; did you make her pregnant? He said: Yes. He asked: Did you buy her? He said: No. He asked: Was she given to you as a gift? He said: Yes. He asked: Do you have any proof? He said: I have no proof. He said: Bring proof, or I will stone you. The woman was told: Your husband is going to be stoned. So the woman came to Sayyiduna Umar (may Allah be pleased with him) and admitted that she had given her to him as a gift. Sayyiduna Umar (may Allah be pleased with him) imposed on her the hadd for false accusation (qadhf). Imam al-Shafi'i (may Allah have mercy on him) said: If he did this out of ignorance, thinking it lawful, we will avert the hadd from him, but we will give him a discretionary punishment (ta'zir).
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الحدود / 17081