thomas carlyle, a devout christian, answers this question in a way that refutes the allegation that islam spread by sword.
“in 622 ad, the intention of this prophet was to spread his religion (islam) through wisdom and fair admonition. he did his best to achieve this but the wrongdoers and disbelievers did not only reject his mission and call for the right path, but only tried to silence him by all means: threat, menace, and oppression lest his mission should spread. all this justified his defending himself and his mission in the face of quraish.
“i believe that right spreads in any way as per circumstances: hasn’t christianity resorted to sword sometimes”? charlemagne did enough with saxons. i do not care if right spreads by sword, tongue, or any other means. let facts spread their power through oratory, press, or through fire; let facts struggle with all its might for it will never be beaten except for those facts that deserve to perish.
“let us put the question in other words: mohammad fought his enemies and resisted those who fought him, but why did moslems fight outside their homelands? they fought against the persians and romans in big battles. now, does not this prove that islam is inclined to violence and spreads by sword?
“the person who asks this question does not know that the mission of islam is a global mission from its first day. it is not like the missions of the previous prophets and messengers such as jesus christ – peace be upon him- who tells his disciples: ‘i was sent only to the lost sheep of israel." (john 15:24) and again he stresses this point: “"do not go among the gentiles or enter any town of the samaritans. go rather to the lost sheep of israel.” (john 10:5) and in the bible of mark the idea is reiterated: “jesus left that place and went to the vicinity of tyre. he entered a house and did not want anyone to know it; yet he could not keep his presence secret. in fact, as soon as she heard about him, a woman whose little daughter was possessed by an evil spirit came and fell at his feet. the woman was a greek, born in syrian phoenicia. she begged jesus to drive the demon out of her daughter. "first let the children eat all they want," he told her, "for it is not right to take the children's bread and toss it to their dogs."
“as for islam, its mission is universal. allah – swt – says in the holy qur’an: “and in no way have we sent you except as a constant bearer of good tidings and a constant warner to the whole of mankind.” (sheba 28) and “and in no way have we sent you except as a mercy to the worlds.” (the prophets 107)
“so the proposition that persians and romans are not included in the islamic mission contradicts the divine wisdom in sending his prophet and does not match the broad meaning of allah’s mercy that embraces all creatures.
“another question rises here: wasn’t it more suitable to present this mission through understanding instead of fighting?
“this really happened. the prophet – peace be upon him- send his emissaries who had the highest levels of understanding, maturity, and commitment to truthfulness in conveying his messages. among these were abdullah bin hudhafa as-sahmi who was sent to khosrau, the king of the persians. the prophet wrote him: "(this letter is) from muhammad the slave of allah and his prophet to khosrau the ruler of persia. peace be upon him, who follows the right path and witnesses that there is no god but allah and muhammad is the prophet of allah. furthermore i invite you to the call of allah – the great and almighty- for i am the prophet of allah to all mankind to warn whomever is living and that the saying may come true against the disbelievers. if you become a muslim you will be safe and if you reject this invitation of islam you will be committing a sin by misguiding your persians.’
upon reading the letter khosrau went mad and tore the letter into pieces. he wrote to the ruler of yemen: “i heard that a man from quraish appeared in mecca and claimed to be a prophet. go to him and ask him to repent. otherwise, kill him and send me his head.” he ended his letter: “dare he to write me in this way while he is my slave?”
consequently, the ruler of yemen, sent two knights along with the letter of khosrau and told him: “khosrau ordered king bazan to send someone to bring you. if you refuse, you and your people will die and your land will be destroyed.”
“so, who declared war? khosrau did.
“as for caesar the prophet – peace be upon him- sent dihya al kalbi. caesar was wiser than khosrau because he was familiar with the scriptural knowledge (torah and gospel) that mentioned the approach of the appearance of prophet muhammad – peace be upon him.
history tells us that upon receiving the prophet’s letter caesar searched about some meccans to inquire about the sender of the letter. he found abu sufyan- the biggest enemy of the prophet at the time – along with a group of merchants with him.
he called for his translator who, translating caesar’s question said to them, "who amongst you is closely related to that man who claims to be a prophet?" abu sufyan replied, "i am the nearest relative to him (amongst the group)."
caesar said, "bring him (abu sufyan) close to me and make his companions stand behind him." abu sufyan added, caesar told his translator to tell my companions that he wanted to put some questions to me regarding that man (the prophet) and that if i told a lie they (my companions) should contradict me." abu sufyan added, "by allah! had i not been afraid of my companions labeling me a liar, i would not have spoken the truth about the prophet.
once abu sufyan answered all caesar’s questions about muhammad, caesar said: “i asked you about his family and your reply was that he belonged to a very noble family. in fact all the apostles come from noble families amongst their respective peoples. i questioned you whether anybody else amongst you claimed such a thing, your reply was in the negative. if the answer had been in the affirmative, i would have thought that this man was following the previous man's statement. then i asked you whether anyone of his ancestors was a king. your reply was in the negative, and if it had been in the affirmative, i would have thought that this man wanted to take back his ancestral kingdom.
i further asked whether he was ever accused of telling lies before he said what he said, and your reply was in the negative. so i wondered how a person who does not tell a lie about others could ever tell a lie about allah. i then asked you whether the rich people followed him or the poor. you replied that it was the poor who followed him. and in fact all the prophets have been followed by this very class of people.
then i asked you whether his followers were increasing or decreasing. you replied that they were increasing, and in fact this is the way of true faith, till it is complete in all respects. i further asked you whether there was anybody, who, after embracing his religion, became displeased and discarded his religion. your reply was in the negative, and in fact this is (the sign of) true faith, when its delight enters the hearts and mixes with them completely. i asked you whether he had ever betrayed.
you replied in the negative and likewise the apostles never betray. then i asked you what he ordered you to do. you replied that he ordered you to worship allah and allah alone and not to worship any thing along with him and forbade you to worship idols and ordered you to pray, to speak the truth and to be chaste. if what you have said is true, he will very soon occupy this place underneath my feet and i knew it (from the scriptures) that he was going to appear but i did not know that he would be from you, and if i could reach him definitely, i would go immediately to meet him and if i were with him, i would certainly wash his feet.' caesar then asked for the letter addressed by allah's prophet, which was delivered by dihya to the governor of busra, who forwarded it to caesar to read. the contents of the letter were as follows: "in the name of allah the beneficent, the merciful (this letter is) from muhammad the slave of allah and his prophet to caesar the ruler of byzantine. peace be upon him, who follows the right path. furthermore i invite you to islam, and if you become a muslim you will be safe, and allah will double your reward, and if you reject this invitation of islam you will be committing a sin by misguiding your arisiyin (peasants). (and i recite to you allah's statement :('o people of the scripture! come to a word common to you and us that we worship none but allah and that we associate nothing in worship with him, and that none of us shall take others as lords beside allah. then, if they turn away, say: bear witness that we are muslims (those who have surrendered to allah).' (the family of imran 64).