The polytheists stood in two positions in relation to the Prophet ﷺ and the believers. There were the polytheists of the people at war, whom he fought and who fought him, and the polytheists of the people bound by treaty, whom he did not fight and who did not fight him.Whenever a woman from the people at war emigrated, she would not be proposed to until she had menstruated and become pure. Once she was pure, marriage became permissible for her. If her husband emigrated before she married, she would be returned to him. If a male or female slave belonging to him emigrated, they became free and were entitled to what the emigrants were entitled to.But if a male or female slave belonging to the polytheists bound by treaty emigrated, they would not be returned, though their value would be paid back.
كان المشركون على منزلتين من النبي ﷺ والمؤمنين، كانوا مشركي أهل حرب يقاتلهم ويقاتلونه، ومشركي أهل عهد لا يقاتلهم ولا يقاتلونه. وكان إذا هاجرت امرأة من أهل الحرب لم تخطب حتى تحيض وتطهر، فإذا طهرت حل لها النكاح، فإن هاجر زوجها قبل أن تنكح ردت إليه، وإن هاجر عبد منه أو أمة فهما حران، ولهما ما للمهاجرين، وإن هاجر عبد أو أمة للمشركين أهل العهد لم يردوا، وردت أثمانهم.
Bukhari narrated it in the Book of Divorce (5286) from Ibrahim bin Musa, who said, Hisham informed us, from Ibn Jurayj. And Ataa said, from Ibn Abbas, and he mentioned it.Regarding his statement in the chain "and Ataa said," Ibn Hajar said, this is connected to something omitted, as if it were among a group of hadiths that Ibn Jurayj narrated from Ataa, then he said, "and Ataa said." Fath al-Bari (9/418).A note of caution, this chain was criticized by Abu Masud Dimashqi and others, and Ibn Hajar defended it, as mentioned in the aforementioned source.