Islam teaches Muslims that they should never take non-Muslims as patrons against other Muslims. However, Muslims should have good relations with all people. At school, at work, in your neighbourhood, etc., you should be kind and courteous to everyone. Muslims are allowed to have non-Muslims as friends as long as the Muslims keep their faith and commitment to Islam pure and strong, and as long as those non-Muslims do not fight Muslims.
Sheikh Muhammad Al-Mukhtar Ash-Shinqiti, director of the Islamic Center of South Plains, Lubbock, Texas, states the following: The Prophet (peace and blessings be upon him) made peace treaties with some pagan tribes and others. He also did the same with the Jews of Madinah and the Christians of Najran. However, he did this for the sake of Islam and Muslims.
Therefore, befriending non-Muslims and building political alliances is not forbidden per se; they are based on the goal and the possible consequences.
The type of relationship forbidden by the Qur’an has to do with Muslims’ building alliances with non-Muslims in order to harm other Muslims, for Muslims are brothers and sisters to one another and protecting one’s brothers and sisters is obligatory in Islam.
That is why Allah says [Let not the Believers take Unbelievers as allies against (other) Believers] (Aal `Imran 3:28).
So “against (other) Believers” is the key to understanding the whole issue of walaa’ (loyalty) and baraa’ (dissociation) in the Qur’an.