the allies of one another," meaning: the Emigrants and the Helpers.
"And those who believed [but did not emigrate], for you there is no wilayah (guardianship/inheritance) of them at all," meaning: regarding the religion, "until they emigrate." Qatada said: This verse was revealed, so the Muslims inherited through emigration for a time; the Bedouin Muslim would not inherit anything from his Muslim Emigrant relative. Then that was abrogated in Surah al-Ahzab, where He said: "But those of [blood] relationship are more entitled [to inheritance] in the decree of Allah than the [other] believers and the emigrants." Thus, Allah mingled the Muslims with one another, and inheritances became based on the religious bond.
"And if they seek help from you for the religion," meaning: the Bedouins, "then you must help" them, due to the sanctity of Islam.
"Except against a people between yourselves and whom is a treaty," meaning: the people of truce and covenant among the polytheists of the Arabs. Qatada said: The Muslims were forbidden from violating their treaty.
بَعضهم أَوْلِيَاء بعض﴾ يَعْنِي: الْمُهَاجِرِينَ وَالأَنْصَارَ.
﴿وَالَّذِينَ آمَنُوا [وَلَمْ يُهَاجِرُوا] مَا لَكُمْ مِنْ ولايتهم من شيءٍ﴾ يَعْنِي: فِي الدِّينِ ﴿حَتَّى يُهَاجِرُوا﴾ قَالَ قَتَادَة: نزلت هَذِه الْآيَة، فَتَوَارَثَ الْمُسْلِمُونَ بِالْهِجْرَةِ زَمَانًا، وَكَانَ لَا يَرِثُ الأَعْرَابِيُّ الْمُسْلِمَ مِنْ قَرِيبِهِ الْمُهَاجِرِ الْمُسْلِمِ شَيْئًا، ثُمَّ نُسِخَ ذَلِكَ فِي سُورَةِ الأَحْزَابِ؛ فَقَالَ: ﴿وَأولُوا الأَرْحَامِ بَعْضُهُمْ أَوْلَى بِبَعْضٍ فِي كِتَابِ اللَّهِ مِنَ الْمُؤْمِنِينَ وَالْمُهَاجِرِينَ﴾ فَخَلَطَ اللَّهُ الْمُسْلِمِينَ بَعْضُهُمْ بِبَعْضٍ، وَصَارَتِ الْمُوَارِيثُ بِالْمِلَلِ.
﴿وَإِنِ اسْتَنْصَرُوكُمْ فِي الدّين﴾ يَعْنِي: الْأَعْرَاب ﴿فَعَلَيْكُم النَّصْر﴾ لَهُمْ؛ لِحُرْمَةِ الإِسْلامِ.
﴿إِلا عَلَى قوم بَيْنكُم وَبينهمْ مِيثَاق﴾ يَعْنِي: أَهْلَ الْمُوَادَعَةِ وَالْعَهْدِ مِنْ مُشْرِكِي الْعَرَبِ. قَالَ قَتَادَةُ: نَهَى الْمُسلمُونَ عَن نقض ميثاقهم.