Al-Zuhri (may Allah have mercy on him) says: I came to Urwah bin al-Zubayr (may Allah have mercy on him), and Ibn Abi Hunayd had asked him about this saying of Allah: "When believing women come to you as emigrants, examine them" [Surah al-Mumtahanah: 10]. Urwah bin al-Zubayr (may Allah have mercy on him) wrote to him in reply that when the Messenger of Allah (peace and blessings be upon him) made the Treaty of al-Hudaybiyyah, there was a condition in it that whoever came without the permission of his guardian, he would return him. But when the Muslim women emigrated and came to the Messenger of Allah (peace and blessings be upon him), Allah commanded: if they come out of desire for Islam, then examine them. "If you know them to be believers, do not return them to the disbelievers" [Surah al-Mumtahanah: 10]. The Messenger of Allah (peace and blessings be upon him) kept back the women and returned the men.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الجزية / 18835