Ibn Al-Qayyim said:
“The first revelation given to the Prophet (saw) by his Lord (swt) was his order to him: “Read in the name of your Lord who created, created man out of an alaq.” [96:1-2] This was the start of his Prophethood. The instruction to him was to read within himself. At the point, He did not order him to convey anything to anyone. He subsequently revealed to him: “O you who are enfolded, arise and warn.” [74: 1-2] This means that God made him a prophet by telling him to read, and He gave him his mission by saying: “O you who are enfolded,arise and warn.” [74: 1-2] God then ordered him to warn his immediate clan. Subsequently, he gave the same warning to his own people, then to the surrounding Arabian tribes, then all Arabs, then mankind generally.
For more than a decade after the start of his Prophethood, Muhammad (saw) continued to advocate the faith without resorting to fighting or the imposition of any loyalty tax (i.e. jizyah). Throughout this period he was ordered to stay his hand, forbear patiently and overlook all oppositions. Later, God gave him permission to migrate (from Makkah to Madeenah) and permitted him to fight. He (swt) then instructed him to fight those who wage war against him and to maintain peace with those who refrain from fighting him. At a later stage, God ordered him to fight the idolaters until all submission is made to God alone.
After the order was given to the Prophet to strive and fight for God’s cause, unbelievers were in three categories with regard to their relations with him:  those with whom he was in peace and truce,  combatants fighting him,  and those under his protection (Ahlul-Dhimmah). God ordered him to honour his treaties with those whom he had a pace treaty, as long as they honoured their commitments. If he feared treachery on their part, he was to revoke the treaty but would not fight them until he had informed them of the termination of their peace treaty. On the other hand, he was to fight those who violated their treaties with him.
When Soorah 9, At-Tawbah, was revealed, it outlined the policy towards all these three categories. The Prophet (saw) is ordered there to fight his enemies from among the people of earlier faiths until they either submit to his authority, paying the loyalty tax, jizyah, or embrace Islaam. He is also ordered in the same Soorah to strive hard against the kuffaar with arm, and against the hypocrites with arguments and proof.
A further order to the prophet (saw) in Soorah 9 was to terminate all treaties with unbelievers, classifying such people into three groups:
– The first group he was ordered to fight, because these were the ones who violated their treaties with him and who were untrue to their commitments. He fought them and was victorious.
– The second group consisted of those with whom he had a pace treaty which they had honoured fully, and the treaty was to run for a specific term. They had given no support to any person or group who opposed the Prophet. With these he was to honour the peace treaty until it had run its course.
– The third group included those with whom he Prophet had no treaty and no previous fighting engagements, as well as those who had an open-ended agreement. The Prophet (saw) was instructed to give these groups four months’ notice, after which he was to fight them. The Prophet acted on these instructions, fought those who violated their treaties, and gave four months’ notice to those who had no treaty or had one without a specific term. Those who honoured their treaties were to have it honoured by the Prophet until the end of its term. All these embraced Islaam before thee end of their term. As for those who pledged loyalty to him, they were to pay the loyalty tax, jizyah.
Thus, after the revelation of Soorah 9, the unbelievers were in three different categories with regard to the Prophet’s relations with them: (1) combatants, or (2) bound by a specified-term treaty, or (3) loyal. The second category embraced Islaam shortly thereafter, leaving the other two groups: combatants who feared him, and those who were loyal. Thus all mankind were divided into three classes: (1) Muslims who believed in the Prophet’s message; (2) those at peace with him who enjoyed security; and (3) those who were hostile and feared him.
As for the hypocrites, he was instructed to accept from them what they professed, leaving the final verdict on them to God. He was to strive against them with informed argument. he was further instructed to turn away from them and to be hard so that he would deliver his message to them in a way that they could not refute. He was forbidden to pray for them when they died, or to visit their graves. He was informed that if he were to pray for them to be forgiven, God would not forgive them.
Such was the prophet’s policy towards his opponents, both unbelievers and hypocrites.
[Zaad Al-Ma’aad, 3/158-161]