It is an established fact that all the Prophets and Messengers of God (may Allah be pleased with them all) were sent as light bearers to the humanity; they all came with the purpose of upholding the truth, maintaining justice and bringing man closer to his Lord.
In accomplishing this task, Prophet Muhammad (peace and blessings be upon him), as well as other Prophets of God, had to undergo series of difficulty, hardship and torment to make people grasp and believe in the message brought to them. But none of these Prophets initiated attack or aggression against their people. To the contrary, they tasted all kinds of torture and persecution in the course of their mission. So, the main feature of all these Prophets was showing mercy and praying for their people’s guidance.
Dr. M. M. Abu Laylah professor of Comparative Religions, and head of the English Department at Al-Azhar Univ., states the following: we’d like to make it clear that in Islam we are commanded not to discriminate between one Prophet and another. We believe in all Prophets and Messengers sent by Allah to guide us and lead us to the way of Allah. The Qur’an says: (Say (O Muslims): We believe in Allah and that which is revealed unto Us and that which was revealed unto Abraham, and Ishmael, and Isaac, and Jacob, and the tribes, and that which Moses and Jesus received, and that which the Prophets received from their Lord. We make no distinction between any of them, and unto Him we have surrendered.) (Al-Baqarah 2: 136)

(The messenger believeth in that which hath been revealed unto him from his Lord and (so do) the believers. Each one believeth in Allah and His angels and His scriptures and His messengers We make no distinction between any of His messengers and they say: We hear, and we obey. (Grant us) Thy forgiveness, our Lord. Unto Thee is the journeying.) (Al-Baqarah 2: 285) So in the light of this, we want you to know that we accept Jesus as a prophet of Allah.

As comparison and contrast goes, it was not the aim of Jesus to build a state. That is why we find that the people who followed him were small in number and influence. Though in the New Testament and in the four Gospels, in particular, Jesus did ask his followers to carry their swords and to follow him, he clearly said that he came not only to cast peace but also to set fire. He asked his disciples to be ready to sacrifice their lives for his cause.

Muhammad (peace and blessings be upon him) never raised or commanded any of his followers to raise a sword against his enemies in Makkah. Rather, he ordered them to remain patient and steadfast (despite all the persecutions and torture displayed by the Quraish against them). But when he moved to Madinah, Allah commanded him to establish the Muslim State, and this necessitated some sort of power and authority. Nonetheless, he was ordered not to resort to force in dealing with people disbelieving in him until after exhausting all peaceful means. For example, he concluded a peace treaty with the Jews acknowledging their religious and political rights and giving them the same rights as Muslims to live in Madinah and to run their own society in accordance with their own religion with no interference from Muslims. But all this did not prevent the Pagans of Makkah, aided by their Jewish allies in Madinah, to launch an attack against the Muslim State, so the war took place.
Here, we may bring to your notice that even though the war between the Muslims and non-Muslims in Arabia was very much limited and was under tough conditions, it was a sort of self-defence and with aim of preserving the creed and defending the newly established State.

Muhammad was not only a prophet like Jesus or Moses (peace and blessings be upon them all) but he was a prophet and a statesman, and his mission was a universal one. Along this line, Prophet Muhammad delivered his message outside Arabia through peaceful means. He performed peace treaties even with the polytheists in Makkah, received Christian delegations in his mosque and conducted a dialogue with them in the best decent manner ever existed. While still in Makkah, he sent a delegation to the Christian country, Abyssinia, and the history also recorded that its king, Negus, who was also at the helm of the Christian hierarchy, was held in high esteem by Prophet Muhammad (peace and blessings be upon him).

War in Islam is only legitimate if it is for self-defence or as a means to defend the religion, tradition, and the way of life as believed by Muslims. Even if the war takes place between Muslims and non-Muslims, there are certain religious and human conditions that should be taken into consideration. For example, the civilians should not be attacked, the crops should not be destroyed, and the water supply and other means of living should not be ruined.