This verse and the following ones relate to fighting and have to be explained thoroughly for the following reasons:
– The first reason, which is the most important one is that we have to stand in the face of the two kinds of opinions resulted from either the ignorance or from the intention of conspiring against the Islam religion via its enemies: The Zionists, first, then the enemies of the Islamic nation in general,, they refer to the verses out of their context and they do not refer the unspecific verses to the precise ones, additionally, they do not take into consideration the purposes of Islamic legislation in judging the matters.
– There are many problems in the interpretation of some verses of the Qur’an by those who did not understand the reality of interpretation and the reality of Islamic law, and they take matters superficially and cut part of the verses and say that this religion incites the killing of the atheist and the polytheist, while, this is not true at all. In the Arabic language the word (kufr) -(atheism) in English- means (to conceal), as we have proven in many verses. On the other hand, when the reasons for the revelation of the verses are related to a battle, we are faced with a set of successive verses from which we cannot cut any part, therefore, we must follow the Qur’anic verses in their logical and rational sequence. Our religion is a religion of thinking and the basis of the assignment is the mind, so we cannot take the meanings of these verses other than what Allah (swt) wanted and in a different way than they should be.
Hence, these verses are connected with the battles that took place between the polytheists in Mecca, some Arabic tribes and the jews who supported them, and between the Prophet (saws) and the believers who stand with him. These verses have been exploited by some people for the purpose of terrorism, extremism, Takfir, killing people and committing the most heinous crimes, while raising Islamic slogans that distort what Allah (swt) has revealed, of course an interpretational distortion, because the Qur’an can never be distorted:
إِنَّا نَحْنُ نَزَّلْنَا الذِّكْرَ وَإِنَّا لَهُ لَحَافِظُونَ
(Indeed, it is We who sent down the Qur’an and indeed, We will be its guardian.) (Al-Hujurat: 9)
(… وَدُّوا لَوْ تَكْفُرُونَ كَمَا كَفَرُوا فَتَكُونُونَ سَوَاءً ) (They wish you would disbelieve as they disbelieved so you would be alike.…): The pronoun (They) refers to the hypocrites, according to what mentioned in the previous verse. (wish) indicates the great desire of their hearts to drag the Muslims to their side in fighting the Muslims.
(… فَلَا تَتَّخِذُوا مِنْهُمْ أَوْلِيَاءَ …) (…So do not take from among them allies …): It is not possible for you when you are fighting your enemy while you are on the battlefield that there is an ally between you and this enemy, for whoever claims that he is with you and fights on the side of the polytheists, you cannot take him as an ally.
(… حَتَّىٰ يُهَاجِرُوا فِي سَبِيلِ اللَّهِ …) (…until they emigrate for the cause of Allah …): The Prophet (saws) has specified the emigration for the cause of Allah (swt) in the following Hadith:
“(The value of) an action depends on the intention behind it. A man will be rewarded only for what he intended. The emigration of one who emigrates for the sake of Allah and His Messenger is for the sake of Allah and His Messenger; and the emigration of one who emigrates for gaining a worldly advantage or for marrying a woman is for what he has emigrated.”
Emigration to Allah (swt) means to abandon all what Allah (swt) has forbidden, this is the deep meaning of the emigration, the Prophet (saws) said:
“There is no emigration after the conquest (of Makkah) but only Jihad [(striving and fighting in the cause of Allah) will continue] and good intention.”
Meaning, you cannot take from among them allies unless they emigrate to what Allah (swt) orders and avoid what Allah (swt) forbids.
( فَإِن تَوَلَّوْا فَخُذُوهُمْ وَاقْتُلُوهُمْ حَيْثُ وَجَدتُّمُوهُمْ ۖ وَلَا تَتَّخِذُوا مِنْهُمْ وَلِيًّا وَلَا نَصِيرًا … ) (…But if they turn away, then seize them and kill them wherever you find them and take not from among them any ally or helper): Seize and kill them in the fighting yard. The Prophet and the believers with him has not begun the fighting rather they are defending themselves against the hostility, so it does not mean as some people say that you have to seize and kill anyone who does not believe with the same as what you believe, certainly, this is a wrong interpretation of Allah’s Book.
 Sunan Abu Dawwod: Book of Divorce, Hadith No. 2201
 Sahih al-Bukhari: Book of Fighting in the cause of Allah, Hadith NO. 2670.