The Prophet ﷺ saw a heavily pregnant woman at the entrance of a tent, or at the edge of a tent.The Messenger of Allah ﷺ asked, "Does her master perhaps have relations with her?"They replied, "Yes."He said, "I was about to curse him with a curse that would go down with him into his grave. How can he claim her child as his heir when the child is not lawful for him? And how can he use her as a servant when she is not lawful for him?"
حدثنا يحيى عن شعبة عن يزيد بن خمير عن عبد الرحمن بن جبير بن نفير عن أبيه
أن النبي ﷺ رأى امرأة مجحا على باب فسطاط أو طرف فسطاط فقال رسول الله ﷺ لعل صاحبها يلم بها قالوا نعم قال لقد هممت أن ألعنه لعنة تدخل معه في قبره كيف يورثه وهو لا يحل له وكيف يستخدمها وهو لا يحل له
Its isnad is sahih. Yazid bin Numayr is trustworthy, and his hadith is found in Muslim and the four Sunan. Likewise, Jubayr bin Nufayr and his father, Nufayr bin Malik, were among the companions. The hadith was narrated by Abu Dawud, 2/249, no. 2156, and something similar to it was narrated by Muslim, 2/1065, no. 1441, in the chapter on marriage, on the prohibition of having intercourse with a pregnant woman. His statement, "mujhan," means a pregnant woman who is close to giving birth.