Commentary
They were prohibited from allying with the disbelievers due to kinship among them, or friendship before Islam, or other reasons by which they become friends and interact. This has been repeated in the Qur'an. (And whoever allies with them among you, then indeed, he is one of them), (Do not take the Jews and the Christians as allies), (You will not find a people who believe in Allah)... the verse. Love for the sake of Allah and hatred for the sake of Allah is a great principle and a foundation of faith. Among the believers, it means that you have a justification for allying with the believers instead of the disbelievers, so do not prefer them over them. And whoever does that, he is not from Allah in anything. And whoever allies with the disbelievers is not part of Allah's guardianship in any way that can be called guardianship, meaning he is completely severed from Allah's guardianship. This is a reasonable matter, for the alliance with a friend and the alliance with an enemy are contradictory. He said:
You wish for my enemy, then you claim that I... am your friend; the foolishness is not far from you.
So, he is not my brother who loves me for what he sees with his own eyes... but my brother is the one who loves me in my absence.
The foolishness: ignorance. And the distant: far away. He says: The friend is one who does not befriend the enemy of his friend, and one who maintains brotherhood in absence, not by what is seen with the eye. It is permissible to express love in the form of a reproachful question, and to present it in the form of a statement for emphasis. 'What he sees with his own eyes' is an adverbial phrase meaning at the time he saw with his own eyes; and 'in absence' refers to times of absence.
Except that you fear from them a fear (taqah) if you fear from their side a matter that must be feared. And it is read as taqiyyah. The one who fears is called taqah and taqiyyah, as they say: The prince struck his struck one. They were permitted to ally with them if they feared them, and the intended meaning of that alliance is a visible contradiction and interaction while the heart is assured of enmity and hatred, waiting for the removal of the barrier from the stick's skin, like the saying of Jesus, blessings of Allah be upon him, "Be moderate and walk aside." And Allah warns you against Himself, so do not expose yourselves to His wrath by allying with His enemies. This is a severe warning. It is permissible that (you fear) implies the meaning of being cautious and afraid, and it can be transitive with (taqah) or taqiyyah as a source, like His saying: (Fear Allah as He should be feared).
Explore Other Scholars on This Verse
Compare different scholarly perspectives on Surah Ali 'Imran verse 28