Short answer
Yes, within limits set by God (﷾). The Qur'an records its enemies' charges against it and answers them with argument. It tells Muslims to argue in the best way, and it forbids them to insult the gods of others. No one may be forced into the faith. The Prophet (ﷺ) bore insults and accusations to his face with patience. What Islam forbids is lying, slander, backbiting and insult. Classical Islamic law punishes slander and counts insulting the Prophet (ﷺ) among the gravest crimes. Islamic law gives any penalty to a lawful court in a Muslim state, after a trial. Muslim scholars hold that no individual may take it into his own hands. Wherever a Muslim lives, he keeps the law of that country (17:34), and he answers insults only with words and patience (3:186). Every society limits speech. England had a crime of blasphemy until 2008. It still punishes lying under oath and stirring up racial hatred. The difference is that Islam's moral limits on speech come from God (﷾), and they do not move.
Full explanation
The Qur'an keeps its critics' words
A book that wanted its critics silenced would not preserve their charges. The Qur'an records them. They said it is a forgery that others helped to write. They said it is old tales dictated to the Prophet (ﷺ). They said a man was teaching him. Muslims recite these charges in their prayers. The Qur'an answers with an argument. The man they pointed to spoke a foreign tongue, while the Qur'an is clear Arabic.
“But the misbelievers say: "Naught is this but a lie which he has forged, and others have helped him at it." In truth it is they who have put forward an iniquity and a falsehood. And they say: "Tales of the ancients, which he has caused to be written: and they are dictated before him morning and evening."”
“We know indeed that they say, "It is a man that teaches him." The tongue of him they wickedly point to is notably foreign, while this is Arabic, pure and clear.”
Argue in the best way
The Qur'an tells the Prophet (ﷺ) to invite people with wisdom and to argue in the best and most gracious way. It tells Muslims to argue with Jews and Christians only in a better way. It forbids them even to revile the gods of others. And it forces no one. There is no compulsion in religion, and whoever wills may believe or reject. The same verse warns of the Fire. The freedom is real in this world, and the account is given in the next.
“Invite (all) to the Way of thy Lord with wisdom and beautiful preaching; and argue with them in ways that are best and most gracious: for thy Lord knoweth best, who have strayed from His Path, and who receive guidance.”
“And dispute ye not with the People of the Book, except with means better (than mere disputation), unless it be with those of them who inflict wrong (and injury): but say, "We believe in the revelation which has come down to us and in that which came down to you; Our Allah and your Allah is one; and it is to Him we bow (in Islam)."”
“Revile not ye those whom they call upon besides Allah, lest they out of spite revile Allah in their ignorance. Thus have We made alluring to each people its own doings. In the end will they return to their Lord, and We shall then tell them the truth of all that they did.”
“Let there be no compulsion in religion: Truth stands out clear from Error: whoever rejects evil and believes in Allah hath grasped the most trustworthy hand-hold, that never breaks. And Allah heareth and knoweth all things.”
“Say, "The truth is from your Lord": Let him who will believe, and let him who will, reject (it): for the wrong-doers We have prepared a Fire whose (smoke and flames), like the walls and roof of a tent, will hem them in: if they implore relief they will be granted water like melted brass, that will scald their faces, how dreadful the drink! How uncomfortable a couch to recline on!”
The Prophet (ﷺ) bore his critics
A man told the Prophet (ﷺ) to his face, while he was dividing property, to do justice. Umar, his companion, asked leave to kill him. The Prophet (ﷺ) said, "Leave him." Another man said that a division of spoils by the Prophet (ﷺ) was unfair. He answered that Moses was hurt with more and was patient. A creditor who spoke rudely was defended, since the one owed "has the right to speak". The creditor was repaid with a better camel. A Bedouin who yanked his cloak got a smile and a gift. Some Jews greeted him with "death be upon you". He answered only "and upon you", and told his wife Aisha to be gentle.
Abu Sa'id al-Khudri reports that while the Prophet (ﷺ) was dividing property, a man said to him, "Do justice." Umar asked leave to strike off his head, and the Prophet said, "Leave him."
Abdullah ibn Mas'ud reports that after Hunayn, when the Prophet (ﷺ) gave some leading Arabs a larger share of the spoils, a man said the division was not just and not made for Allah's sake. When told of it, the Prophet said: who would be just if Allah and His Messenger were not? May Allah have mercy on Moses; he was hurt with more than this, and he was patient.
Abu Huraira reports that a man came to demand a debt from the Prophet (ﷺ) and spoke harshly. The companions moved against him, but the Prophet said: leave him, for the one who is owed has the right to speak. He had the man repaid with an older, better camel than the one owed, and said the best of people are those who repay best.
Anas reports that a bedouin pulled the Prophet's (ﷺ) cloak so roughly that its hem left a mark on his shoulder, and demanded to be given some of the wealth Allah had given him. The Prophet turned to him, smiled, and ordered that he be given a gift.
Aisha reports that some Jews greeted the Prophet (ﷺ) with "death be upon you", and she cursed them in return. He told her to be gentle, for Allah loves gentleness in every matter. When she asked whether he had not heard what they said, he replied that he had answered them only with "and upon you".
Ka'b ibn al-Ashraf
Critics point to Ka'b ibn al-Ashraf, whose killing the Prophet (ﷺ) ordered. Ka'b was not killed for disagreeing. He was a leading man in Medina. The Quraysh, the leading tribe of Mecca, were at war with the Muslims. After the battle of Badr, Ka'b went to Mecca. He mourned their dead in his poems and urged them to fight the Prophet (ﷺ) again. That was a call to war against his own city, not an opinion. Abu Rafi' was killed on a later order. Al-Bukhari's report describes him as a man who helped the Prophet's (ﷺ) enemies against him. Both orders came from the Prophet (ﷺ) as head of state and judge of Medina, in a time of war. No private person may copy them.
Jabir ibn Abdullah reports that the Prophet (ﷺ) asked who would deal with Ka'b ibn al-Ashraf, who had harmed Allah and His Messenger, and Muhammad ibn Maslama volunteered.
Reports that after the Muslim victory at Badr, Ka'b ibn al-Ashraf, a leading man in Medina, went to Mecca, mourned the Quraysh dead in his poems and urged the Quraysh to fight the Prophet (ﷺ) again. After he returned to Medina the Prophet asked who would deal with him.
Al-Bara ibn Azib reports that the Prophet (ﷺ) sent a party of the Ansar, led by Abdullah ibn Atik, against Abu Rafi', who used to harm the Prophet and help his enemies against him, and who lived in a fortress in the Hijaz.
Truth spoken to power
Islam does not ask its people to flatter rulers. The companions pledged to the Prophet (ﷺ) to listen and obey. In the same pledge they promised to speak the truth wherever they were, fearing no one's blame. In Islam, obedience does not mean silence.
Ubada ibn al-Samit reports that the companions pledged to the Prophet (ﷺ) to listen and obey, not to dispute authority with its holders, and to speak the truth wherever they were, fearing no one's blame for Allah's sake.
The limits God (﷾) set
Islam forbids lying. The Prophet (ﷺ) said lying leads to wickedness and the Fire. A Muslim must check a report before passing it on. For accusing a chaste woman of adultery without four witnesses, the Qur'an sets a penalty of eighty lashes, for a lawful court to apply, and the accuser's testimony is rejected. The schools of law, the main traditions of Islamic law, differ over whether his testimony is restored if he repents. Islam goes further than modern law, because it forbids backbiting. That is saying a true thing about someone that he would dislike. The Qur'an likens it to eating a dead brother's flesh. The Arabic of that verse names backbiting outright (la yaghtab). The rule over all of it is to speak good or keep silent. Classical Islamic law counts insulting the Prophet (ﷺ) among the gravest crimes, and most classical jurists (scholars of Islamic law) made death its penalty. It also sets a penalty for openly leaving Islam, which is a separate question. Muslim scholars hold that any penalty belongs to a lawful court in a Muslim state, after a trial. They hold that no individual may take it on himself. Wherever a Muslim lives, he keeps the law of that country (17:34), and he answers insult with patience (3:186).
Abdullah ibn Mas'ud reports that the Prophet (ﷺ) said truthfulness leads to righteousness and righteousness to Paradise, and a man keeps telling the truth until he becomes truthful. Lying leads to wickedness and wickedness to the Fire, and a man keeps lying until he is recorded with Allah as a liar.
“O ye who believe! If a wicked person comes to you with any news, ascertain the truth, lest ye harm people unwittingly, and afterwards become full of repentance for what ye have done.”
“And those who launch a charge against chaste women, and produce not four witnesses (to support their allegations),- flog them with eighty stripes; and reject their evidence ever after: for such men are wicked transgressors;-”
“Behold, ye received it on your tongues, and said out of your mouths things of which ye had no knowledge; and ye thought it to be a light matter, while it was most serious in the sight of Allah.”
Abu Huraira reports that the Prophet (ﷺ) asked his companions what backbiting is, and told them it is saying about your brother what he would dislike. Asked what if the fault is really there, he said: if it is there, you have backbitten him; and if it is not, you have slandered him.
“O ye who believe! Avoid suspicion as much (as possible): for suspicion in some cases is a sin: And spy not on each other behind their backs. Would any of you like to eat the flesh of his dead brother? Nay, ye would abhor it”
Abu Huraira reports that the Prophet (ﷺ) said: whoever believes in Allah and the Last Day must not harm his neighbour, must honour his guest, and must speak good or keep silent.
A classical treatise, written in 1294 CE, on the ruling for one who insults the Prophet (ﷺ). It reports Ibn al-Mundhir's statement that the general body of scholars hold that such a person is to be killed, and sets out the evidence for that ruling.
“Come not nigh to the orphan's property except to improve it, until he attains the age of full strength; and fulfil (every) engagement, for (every) engagement will be enquired into (on the Day of Reckoning).”
“Ye shall certainly be tried and tested in your possessions and in your personal selves; and ye shall certainly Hear much that will grieve you, from those who received the Book before you and from those who worship many gods. But if ye persevere patiently, and guard against evil,-then that will be a determining factor in all affairs.”
Does Islam allow lying?
Critics say Islam lets a Muslim lie whenever it suits him. It does not. The report they quote is about making peace. The Prophet (ﷺ) said that one who makes peace between people by passing on good words is not a liar. Ibn Shihab, one of the men who passed the report on, adds a note. He heard of this allowance in only three cases: war, reconciling people, and what a husband and wife say to each other. Critics also quote the verse about hiding one's faith, which scholars call taqiyya (caution). It covers only a Muslim under real threat. He may say words of unbelief with his tongue while his heart stays firm in faith. The other verse they quote, 3:28, allows a believer to guard himself when in danger from enemies. It too is about fear for one's life, not a licence to deceive. None of this allows a Muslim to cheat a neighbour, a customer or a court.
Umm Kulthum bint Uqba reports that the Prophet (ﷺ) said the one who makes peace between people by conveying good or saying good is not a liar.
Umm Kulthum bint Uqba reports that the Prophet (ﷺ) said the one who reconciles people and says good or conveys good is not a liar. The narrator Ibn Shihab adds that he heard of an allowance for such words in only three cases: war, reconciling people, and what a husband says to his wife and a wife to her husband.
“Any one who, after accepting faith in Allah, utters Unbelief,- except under compulsion, his heart remaining firm in Faith - but such as open their breast to Unbelief, on them is Wrath from Allah, and theirs will be a dreadful Penalty.”
“Let not the believers Take for friends or helpers Unbelievers rather than believers: if any do that, in nothing will there be help from Allah: except by way of precaution, that ye may Guard yourselves from them. But Allah cautions you (To remember) Himself; for the final goal is to Allah.”
Every society limits speech
In England a man can be sued for libel. Lying under oath is perjury. Threatening, abusive or insulting words meant to stir up racial hatred are a crime. In 1977 the editor of the newspaper Gay News was convicted of blasphemous libel for a poem about Christ. In 1979 the House of Lords upheld the conviction. In 2006 Parliament added new crimes of stirring up religious hatred, and in 2008 it abolished blasphemy. The lines were drawn, then moved.
Makes it a crime for a lawfully sworn witness in a judicial proceeding to make, on purpose, a material statement that he knows to be false or does not believe to be true.
Makes it a crime to use threatening, abusive or insulting words or behaviour, or to display such written material, intending to stir up racial hatred, or where racial hatred is likely to be stirred up.
The House of Lords, by three votes to two, upheld the 1977 conviction of Denis Lemon, editor of Gay News, for blasphemous libel over a poem about Christ. The case was a private prosecution brought by Mary Whitehouse.
Abolished the common-law offences of blasphemy and blasphemous libel in England and Wales.
Added new crimes of stirring up religious hatred by threatening words or behaviour, inserted as Part 3A of the Public Order Act 1986.
Perspectives
English law
English law has always limited speech. The lines have moved: blasphemy was punished in 1977 and abolished in 2008, while new offences of stirring up hatred were added.
The House of Lords upheld a conviction for blasphemous libel in 1979.
Parliament abolished the offences of blasphemy and blasphemous libel in England and Wales in 2008.
Perjury and words meant to stir up racial or religious hatred are crimes in England.
The Islamic perspective
Islam gives the freedom to disagree, criticise and argue. The Prophet (ﷺ) bore rude and unjust words with patience. Islam forbids the lie, the slander, the backbiting and the insult, above all the insult to God (﷾) and His prophets. Classical law set penalties for slander and for insulting the Prophet (ﷺ). Muslim scholars hold that only a lawful court may apply them, never an individual on his own, and a Muslim keeps the law of whatever country he lives in. God (﷾) forbade lying, slander and insult, and that moral law has not moved in fourteen centuries.
The Qur'an records its opponents' charges against it and answers them with argument.
The Qur'an commands argument in the best way, forbids reviling others' gods, and forbids compulsion in religion.
The Prophet (ﷺ) let men who accused him of injustice or treated him rudely go unharmed.
Ka'b ibn al-Ashraf urged the Quraysh to fight Medina again. He was then killed on the order of the head of state, in wartime.
The companions pledged to obey. In the same pledge, they promised to speak the truth wherever they were, fearing no one's blame.
Islam forbids lying, slander and backbiting, and commands speaking good or keeping silent.
Islam's allowances are narrow: making peace, war, reconciling spouses, and a Muslim forced under threat; none permits cheating anyone.
Limits fixed by revelation stay where they are, while limits fixed by law and opinion keep moving.