Language:
كتاب الشروط
54  
Conditions
(1)
Chapter: The conditions permissible on embracing Islam, and in contracts and transactions
(1)
باب مَا يَجُوزُ مِنَ الشُّرُوطِ فِي الإِسْلاَمِ وَالأَحْكَامِ وَالْمُبَايَعَةِ
Sahih al-Bukhari 2711, 2712

Narrated Marwan and al-Miswar bin Makhrama:

(from the companions of Allah's Messenger (ﷺ)) When Suhail bin `Amr agreed to the Treaty (of Hudaibiya), one of the things he stipulated then, was that the Prophet (ﷺ) should return to them (i.e. the pagans) anyone coming to him from their side, even if he was a Muslim; and would not interfere between them and that person. The Muslims did not like this condition and got disgusted with it. Suhail did not agree except with that condition. So, the Prophet (ﷺ) agreed to that condition and returned Abu Jandal to his father Suhail bin `Amr. Thenceforward the Prophet (ﷺ) returned everyone in that period (of truce) even if he was a Muslim. During that period some believing women emigrants including Um Kulthum bint `Uqba bin Abu Muait who came to Allah's Messenger (ﷺ) and she was a young lady then. Her relative came to the Prophet (ﷺ) and asked him to return her, but the Prophet (ﷺ) did not return her to them for Allah had revealed the following Verse regarding women: "O you who believe! When the believing women come to you as emigrants. Examine them, Allah knows best as to their belief, then if you know them for true believers, Send them not back to the unbelievers, (for) they are not lawful (wives) for the disbelievers, Nor are the unbelievers lawful (husbands) for them (60.10)

حَدَّثَنَا يَحْيَى بْنُ بُكَيْرٍ، حَدَّثَنَا اللَّيْثُ، عَنْ عُقَيْلٍ، عَنِ ابْنِ شِهَابٍ، قَالَ أَخْبَرَنِي عُرْوَةُ بْنُ الزُّبَيْرِ، أَنَّهُ سَمِعَ مَرْوَانَ، وَالْمِسْوَرَ بْنَ مَخْرَمَةَ، رضى الله عنهما يُخْبِرَانِ عَنْ أَصْحَابِ، رَسُولِ اللَّهِ صلى الله عليه وسلم قَالَ لَمَّا كَاتَبَ سُهَيْلُ بْنُ عَمْرٍو يَوْمَئِذٍ كَانَ فِيمَا اشْتَرَطَ سُهَيْلُ بْنُ عَمْرٍو عَلَى النَّبِيِّ صلى الله عليه وسلم أَنَّهُ لاَ يَأْتِيكَ مِنَّا أَحَدٌ وَإِنْ كَانَ عَلَى دِينِكَ إِلاَّ رَدَدْتَهُ إِلَيْنَا، وَخَلَّيْتَ بَيْنَنَا وَبَيْنَهُ‏.‏ فَكَرِهَ الْمُؤْمِنُونَ ذَلِكَ، وَامْتَعَضُوا مِنْهُ، وَأَبَى سُهَيْلٌ إِلاَّ ذَلِكَ، فَكَاتَبَهُ النَّبِيُّ صلى الله عليه وسلم عَلَى ذَلِكَ، فَرَدَّ يَوْمَئِذٍ أَبَا جَنْدَلٍ عَلَى أَبِيهِ سُهَيْلِ بْنِ عَمْرٍو، وَلَمْ يَأْتِهِ أَحَدٌ مِنَ الرِّجَالِ إِلاَّ رَدَّهُ فِي تِلْكَ الْمُدَّةِ، وَإِنْ كَانَ مُسْلِمًا، وَجَاءَ الْمُؤْمِنَاتُ مُهَاجِرَاتٍ، وَكَانَتْ أُمُّ كُلْثُومٍ بِنْتُ عُقْبَةَ بْنِ أَبِي مُعَيْطٍ مِمَّنْ خَرَجَ إِلَى رَسُولِ اللَّهِ صلى الله عليه وسلم يَوْمَئِذٍ وَهْىَ عَاتِقٌ، فَجَاءَ أَهْلُهَا يَسْأَلُونَ النَّبِيَّ صلى الله عليه وسلم أَنْ يَرْجِعَهَا إِلَيْهِمْ، فَلَمْ يَرْجِعْهَا إِلَيْهِمْ لِمَا أَنْزَلَ اللَّهُ فِيهِنَّ ‏{‏إِذَا جَاءَكُمُ الْمُؤْمِنَاتُ مُهَاجِرَاتٍ فَامْتَحِنُوهُنَّ اللَّهُ أَعْلَمُ بِإِيمَانِهِنَّ‏}‏ إِلَى قَوْلِهِ ‏{‏وَلاَ هُمْ يَحِلُّونَ لَهُنَّ‏}‏‏.‏
Reference : Sahih al-Bukhari 2711, 2712
In-book reference : Book 54, Hadith 1
USC-MSA web (English) reference : Vol. 3, Book 50, Hadith 874
  (deprecated numbering scheme)