Here Allah mentions the types of believers, dividing them into the Muhajirin, who left their homes and estates, emigrating to give support to Allah and His Messenger to establish His religion. They gave up their wealth and themselves in this cause. There are also the Ansar, the Muslims of Al-Madinah, who gave asylum to their Muhajirin brethren in their own homes and comforted them with their wealth. They also gave aid to Allah and His Messenger by fighting alongside the Muhajirun. Certainly they are,
﴿بَعْضُهُمْ أَوْلِيَآءُ بَعْضٍ﴾
(allies to one another), for each one of them has more right to the other than anyone else. This is why Allah's Messenger forged ties of brotherhood between the Muhajirin and Ansar, as Al-Bukhari recorded from Ibn `Abbas. They used to inherit from each other, having more right to inheritance than the deceased man's relatives, until Allah abrogated that practice with the fixed share for near relatives. Imam Ahmad recorded that Jarir bin `Abdullah Al-Bajali said that the Messenger of Allah said,
«الْمُهَاجِرُون وَالْأَنْصَارُ أَوْلِيَاءُ بَعْضُهُمْ لِبَعْضٍ، وَالطُّلَقَاءُ مِنْ قُرَيْشٍ، وَالْعُتَقَاءُ مِنْ ثَقِيفٍ بَعْضُهُمْ أَوْلِيَاءُ بَعْضٍ إِلَى يَوْمِ الْقِيَامَة»
(The Muhajirun and Al-Ansar are the supporters of each other, while the Tulaqa' of Quraysh (whom the Prophet set free after conquering Makkah) and `Utaqa' from Thaqif (whom the Prophet set free from captivity after the battle of Hunayn) are supporters of each other until the Day of Resurrection. )
Only Ahmad collected this Hadith.
Allah praised the Muhajirin and the Ansar in several Ayat of His Book and His Messenger (also praised them too). Allah said,
﴿وَالسَّـبِقُونَ الاٌّوَّلُونَ مِنَ الْمُهَـجِرِينَ وَالأَنْصَـرِ وَالَّذِينَ اتَّبَعُوهُم بِإِحْسَانٍ رَّضِىَ اللَّهُ عَنْهُمْ وَرَضُواْ عَنْهُ وَأَعَدَّ لَهُمْ جَنَّـتٍ تَجْرِي تَحْتَهَا الأَنْهَـرُ﴾
(And the foremost to embrace Islam of the Muhajirun and the Ansar and also those who followed them exactly. Allah is well-pleased with them as they are well-pleased with Him. He has prepared for them gardens under which rivers flow (Paradise).)﴿9:100﴾, k
﴿لَقَدْ تَابَ الله عَلَى النَّبِىِّ وَالْمُهَـجِرِينَ وَالاٌّنصَـرِ الَّذِينَ اتَّبَعُوهُ فِى سَاعَةِ الْعُسْرَةِ﴾
(Allah has forgiven the Prophet, the Muhajirin and the Ansar who followed him in the time of distress.) ﴿9:117﴾, and,
﴿لِلْفُقَرَآءِ الْمُهَـجِرِينَ الَّذِينَ أُخْرِجُواْ مِن دِيَـرِهِمْ وَأَمْوَلِهِمْ يَبْتَغُونَ فَضْلاً مِّنَ اللَّهِ وَرِضْوَناً وَيَنصُرُونَ اللَّهَ وَرَسُولَهُ أُوْلَـئِكَ هُمُ الصَّـدِقُونَ وَالَّذِينَ تَبَوَّءُوا الدَّارَ وَالإِيمَـنَ مِن قَبْلِهِمْ يُحِبُّونَ مَنْ هَاجَرَ إِلَيْهِمْ وَلاَ يَجِدُونَ فِى صُدُورِهِمْ حَاجَةً مِّمَّآ أُوتُواْ وَيُؤْثِرُونَ عَلَى أَنفُسِهِمْ وَلَوْ كَانَ بِهِمْ خَصَاصَةٌ﴾
((And there is also a share in this booty) for the poor Muhajirin, who were expelled from their homes and their property, seeking bounties from Allah and (His) good pleasure, and helping Allah and His Messenger. Such are indeed the truthful. And those who, before them, had homes (in Al-Madinah) and adopted the faith, love those who emigrate to them, and have no jealousy in their breasts for that which they have been given, and give them (emigrants) preference over themselves even though they were in need of that) ﴿59:8-9﴾.
The best comment on Allah's statement,
﴿وَلاَ يَجِدُونَ فِى صُدُورِهِمْ حَاجَةً مِّمَّآ أُوتُواْ﴾
(...and have no jealousy in their breasts for that which they have been given) is that it means, they do not envy the Muhajirin for the rewards that Allah gave them for their emigration. These Ayat indicate that the Muhajirin are better in grade than the Ansar, and there is a consensus on this ruling among the scholars.