Surah: 060 Al-Mumtahina
This is a Madni surah, revealed after the Treaty of Hudaibiyyah, and the title refers to the migrant women who would come from Makkah and ought to have been tested as regards their faith before accepting them under the guardianship of the Muslims.
The believers should not be attached to those who oppose the religion of Allaah (SWT), and should not seek them out as allies. The example of Ibrahim (AS) is cited who disassociated himself from his people until they would believe in Allaah (SWT) and submit to His decree.
Those disbelievers who have not harmed the Muslims or opposed their religion, then they must be treated with justice and kindness.
The women who migrated to Madinah in the way of Allaah (SWT), then their former husband must be repaid the dowry he gave her in marriage and they are separated. Then such women could be taken in marriage by the Muslims.