Encouraging the Disbelievers to seek Allah's Forgiveness, warning Them against Disbelief
Allah commands His Prophet Muhammad ,
قُل لِلَّذِينَ كَفَرُواْ إِن يَنتَهُواْ
(Say to those who have disbelieved, if they cease...) the disbelief, defiance and stubbornness they indulge in, and embrace Islam, obedience and repentance.
يُغْفَرْ لَهُمْ مَّا قَدْ سَلَفَ
(their past will be forgiven.) along with their sins and errors. It is recorded in the Sahih Al-Bukhari that Abu Wa'il said that Ibn Mas'ud said that the Messenger of Allah ﷺ said,
(He who becomes good in his Islam, will not be punished for what he has committed during Jahiliyyah (before Islam). He who becomes bad in his Islam, will face a punishment for his previous and latter deeds.)
The second condition is that they stick to their doggedness and hostility. The injunction covering this situation, appears in the later verse (40) where it was said: وَإِن تَوَلَّوْا فَاعْلَمُوا أَنَّ اللَّـهَ مَوْلَاكُمْ ۚ نِعْمَ الْمَوْلَىٰ وَنِعْمَ النَّصِيرُ ﴿40﴾ (And if they turn away, then, be sure that Allah is your protector. He is the excellent protector and excellent supporter).
In brief, if they fail to desist from their tyranny and disbelief, the injunction Muslims are obligated with is the same as stated above, that is, continue fighting them. Since Jihad involves fighting and killing, it is usually associated with a big army, ample weapons and other hardware and logistic support. But, those days Muslims did not have much of this normally, therefore, it was possible that Muslims would have found this command to fight and kill somewhat heavy, or their lack of numbers or paucity of equipment may have led them to realize that they could not win a war like that. Therefore, Muslims were given the antidote they needed. They were told that it did not matter if the disbelievers had more men and equipment to fight with, but where in the world, were they going to get the unseen support and help of Allah Ta` ala which Muslims have with them and which they have been witnessing as being along with them on every battlefield. Then, towards the end it was said that, for all practical purposes, everyone in the world finds some help and support from someone or somewhere, but the touchstone of how effective and functionally superior it is depends on the power, strength, knowledge and experience of that helper or supporter. It goes without saying that a whole world-full of people could never exceed, even equal the power and strength and knowledge and perception of Allah Ta` ala because He is an excellent protector and an excellent supporter with no one to match Him.
Tazkirul Quran
Maulana Wahiduddin Khan
It is a principle of Islam that the individual is rewarded according to his deeds. However, by His grace Almighty God has made special exemptions to this general principle: when a man is truly repentant, he will not be punished thereafter for his earlier deeds. Suppose a man spent his life in ungodliness, then he received the light of guidance, became a true believer and adopted the righteous life. In this case, he will be forgiven for the evil deeds done by him earlier; he will not be seized on the basis of his earlier crimes. This very principle is also operative in collective and political matters. Sometimes the struggle between Truth and falsehood develops into a clash. During this clash the opponents commit atrocities on the believers. Finally, the supporters of the truth are dominant and the opponents are overcome and subdued. In this matter also, the principle of Islam is the same as stated above, that is, people will not be punished for committing atrocities in the past. Rather, if, after the victory anybody indulges in criminal acts will, after due procedure, receive the punishment prescribed in the Islamic law for such a criminal. In ancient times the establishment of chieftains and rulers was based on polytheism. Today, rulers hold sway as representatives of the people, but in the past they ruled as representatives of God or God’s so called partners. Consequently, in ancient society, polytheism enjoyed a position of power. Polytheists used to harass the believers in the one God. Persecution (fitnah) was common. So God commanded His Prophet and His companions to disrupt the link between polytheism and power so that the polytheists should be deprived of the power to persecute the monotheists. Accordingly, the universal revolution brought about by the Prophet snapped forever the link between polytheism and the political system. Now, polytheism is simply a religious practice in some parts of the world and is not a political theory on the basis of which governments are formed. In Arabia an end had to be put to both polytheists and polytheism, so that the precincts of Makkah and Madinah could be made the eternal centre of pure monotheism.
Uthmani text of the Madinah mushaf (King Fahd Complex). Translation: Saheeh International. Tafsir via Quran.com.