And He brought together their hearts.

And He brought together their hearts. If you had spent all that is in the earth, you could not have brought their hearts together; but Allah brought them together. Indeed, He is Exalted in Might and Wise.

[Qur’aan 8:63]

In this Noble Verse, Allah has said to His Messenger that had you, O Muhammad, spent all that which is in the earth of gold and silver you could not have joined their hearts but Allah combined them on guidance as a result of which their hearts came together.

Allah brought together the hearts of the two tribes of Al-Aws and Al-Kazraj who had become hostile toward one another during the Pre Islamic Period of Ignorance. The two tribes would have wars with one another. Allah brought their hearts together, and they together formed what is termed Al-'ansaar - the helpers.

Narrated Anas:

The Prophet (ﷺ) said, “Love for the Ansaar is a sign of faith and hatred for the Ansaar is a sign of hypocrisy.”

[Sahih Al-Bukhaari Hadith No. 17]

Narrated Abdullah bin Zaid bin Asim:

*When Allah gave to His Apostle the war booty on the day of Hunain, he distributed that booty amongst those whose hearts have been (recently) reconciled (to Islam), but did not give anything to the Ansar.

So they seemed to have felt angry and sad as they did not get the same as other people had got. The Prophet (ﷺ) then delivered a sermon before them, saying, "O, the assembly of Ansar! Didn’t I find you astray, and then Allah guided you on the Right Path through me?

You were divided into groups, and Allah brought you together through me; you were poor and Allah made you rich through me."

Whatever the Prophet (ﷺ) said , they (i.e. the Ansar) said, “Allah and His Messenger are the most benevolent.” The Prophet (ﷺ) said, “What stops you from answering the Messenger of Allah?”

But whatever he said to them, they replied, “Allah and His Messenger are the most benevolent.” The Prophet (ﷺ) then said, "If you wish you could say: ‘You came to us in such-and-such state (at Medina).’ Wouldn’t you be willing to see the people go away with sheep and camels while you go with the Prophet (ﷺ) to your homes? But for the migration, I would have been one of the Ansar, and if the people took their way through a valley or mountain pass, I would select the valley or mountain pass of the Ansar.

The Ansar are Shiar (i.e. those clothes which are in direct contact with the body and worn inside the other garments), and the people are Dithar (i.e. those clothes which are not in direct contact with the body and are worn over other garments). No doubt, you will see other people favored over you, so you should be patient till you meet me at the Tank (of Kauthar).

[Sahih Al-Bukhaari Hadith No. 4330]

Reference(s):

Tafsir Al-Tabari

Tafsir Ibn Katheer

Tafsir Al-Baghawi