is on earth, you could not have brought their hearts together; but Allah brought them together" (Qur'an 8:63), meaning: they were people of the Jahiliyyah, killing one another and acting as enemies; then Allah brought their hearts together until they loved one another, and the grudges that existed between them vanished through Islam.
Surat al-Anfal from verse (65) to verse (69).
فِي الأَرْضِ جَمِيعًا مَا أَلَّفْتَ بَيْنَ قُلُوبِهِمْ وَلَكِنَّ اللَّهَ أَلَّفَ بَينهم﴾ يَعْنِي: أَنَّهُمْ كَانُوا أَهْلَ جَاهِلِيَّةٍ يَقْتُلُ بَعْضُهُمْ بَعْضًا مُتَعَادِينَ؛ فَأَلَّفَ اللَّهُ بَيْنَ قُلُوبِهِمْ حَتَّى تَحَابُّوا، وَذَهَبَتِ الضَّغَائِنُ الَّتِي كَانَتْ بَيْنَهُمْ بِالْإِسْلَامِ.
سُورَة الْأَنْفَال من الْآيَة (٦٥) إِلَى الْآيَة (٦٩).