يَا أَيُّهَا الَّذِينَ آمَنُوا لَا تَتَّخِذُوا عَدُوِّي وَعَدُوَّكُمْ أَوْلِيَاءَ تُلْقُونَ إِلَيْهِم بِالْمَوَدَّةِ وَقَدْ كَفَرُوا بِمَا جَاءَكُم مِّنَ الْحَقِّ يُخْرِجُونَ الرَّسُولَ وَإِيَّاكُمْ ۙ أَن تُؤْمِنُوا بِاللَّهِ رَبِّكُمْ إِن كُنتُمْ خَرَجْتُمْ جِهَادًا فِي سَبِيلِي وَابْتِغَاءَ مَرْضَاتِي ۚ تُسِرُّونَ إِلَيْهِم بِالْمَوَدَّةِ وَأَنَا أَعْلَمُ بِمَا أَخْفَيْتُمْ وَمَا أَعْلَنتُمْ ۚ وَمَن يَفْعَلْهُ مِنكُمْ فَقَدْ ضَلَّ سَوَاءَ السَّبِيلِ
“O believers! Do not take My enemies and yours as trusted allies, showing them affection even though they deny what has come to you of the Truth. They drove the Messenger and yourselves out [of Makkah], simply for your belief in Allah, your Lord. If you [truly] emigrated to struggle in My cause and seek My pleasure, [then do not take them as allies,] disclosing secrets [of the believers] to the pagans out of affection for them, when I know best whatever you conceal and whatever you reveal. And whoever of you does this has truly strayed from the Right Way.”
Revealed after Hatib ibn Abi Balta'ah RA's letter to the Quraysh was intercepted and he was pardoned.
يَا أَيُّهَا الَّذِينَ آمَنُوا إِذَا جَاءَكُمُ الْمُؤْمِنَاتُ مُهَاجِرَاتٍ فَامْتَحِنُوهُنَّ ۖ اللَّهُ أَعْلَمُ بِإِيمَانِهِنَّ ۖ فَإِنْ عَلِمْتُمُوهُنَّ مُؤْمِنَاتٍ فَلَا تَرْجِعُوهُنَّ إِلَى الْكُفَّارِ ۖ لَا هُنَّ حِلٌّ لَّهُمْ وَلَا هُمْ يَحِلُّونَ لَهُنَّ ۖ وَآتُوهُم مَّا أَنفَقُوا ۚ وَلَا جُنَاحَ عَلَيْكُمْ أَن تَنكِحُوهُنَّ إِذَا آتَيْتُمُوهُنَّ أُجُورَهُنَّ ۚ وَلَا تُمْسِكُوا بِعِصَمِ الْكَوَافِرِ وَاسْأَلُوا مَا أَنفَقْتُمْ وَلْيَسْأَلُوا مَا أَنفَقُوا ۚ ذَٰلِكُمْ حُكْمُ اللَّهِ ۖ يَحْكُمُ بَيْنَكُمْ ۚ وَاللَّهُ عَلِيمٌ حَكِيمٌ
“O believers! When the believing women come to you as Emigrants, test their intentions —their faith is best known to Allah— and if you find them to be believers, then do not send them back to the disbelievers. These [women] are not lawful [wives] for the disbelievers, nor are the disbelievers lawful [husbands] for them. [But] repay the disbelievers whatever [dowries] they had paid. And there is no blame on you if you marry these [women] as long as you pay them their dowries. And do not hold on to marriage with polytheistic women. [But] demand [repayment of] whatever [dowries] you had paid, and let the disbelievers do the same. That is the judgment of Allah — He judges between you. And Allah is All-Knowing, All-Wise.”
Revealed settling that the Hudaybiyyah return clause did not apply to believing women migrants.
يَا أَيُّهَا النَّبِيُّ إِذَا جَاءَكَ الْمُؤْمِنَاتُ يُبَايِعْنَكَ عَلَىٰ أَن لَّا يُشْرِكْنَ بِاللَّهِ شَيْئًا وَلَا يَسْرِقْنَ وَلَا يَزْنِينَ وَلَا يَقْتُلْنَ أَوْلَادَهُنَّ وَلَا يَأْتِينَ بِبُهْتَانٍ يَفْتَرِينَهُ بَيْنَ أَيْدِيهِنَّ وَأَرْجُلِهِنَّ وَلَا يَعْصِينَكَ فِي مَعْرُوفٍ ۙ فَبَايِعْهُنَّ وَاسْتَغْفِرْ لَهُنَّ اللَّهَ ۖ إِنَّ اللَّهَ غَفُورٌ رَّحِيمٌ
“O Prophet! When the believing women come to you, pledging to you that they will neither associate anything with Allah [in worship], nor steal, nor fornicate, nor kill their children, nor falsely attribute [illegitimate] children to their husbands, nor disobey you in what is right, then accept their pledge, and ask Allah to forgive them. Surely Allah is All-Forgiving, Most Merciful.”
This is the Bay'at al-Nisa ayah (Q60:12), the terms of the pledge the Prophet ﷺ is taking in the post from the women of Makkah after the conquest.