Following a deadly assault in Nice, former Malaysian leader Mahathir Mohamad tweeted Thursday that Muslims had the right "to kill millions of French people," sparking widespread anger and prompting Twitter to delete his post.
In a church in the southern French city, three people were killed, with the attacker slitting the throat of at least one of them, in what authorities treated as the latest jihadist assault to rock the country.
Shortly thereafter, in a series of tweets, Mr. Mahathir, who was prime minister of Muslim-majority Malaysia until his government collapsed in February, launched an unusual outburst.
Referring to the beheading of a French teacher who showed cartoons of the Prophet Mohammed to pupils, Mr. Mahathir said that he did not approve of that attack, but "insulting other people" does not include freedom of expression.
"Angry people kill, regardless of the religion professed," said the outspoken 95-year-old, who has drawn controversy in the past over remarks attacking Jews and the LGBT community.
"Millions of people have been killed by the French in the course of their history. Many were Muslims. Muslims have the right to be furious and to kill millions of French people for the past massacres."
But he added that "the 'eye for an eye' law was not enforced by the Muslims on the whole. Muslims do not. The French should not."
Mr. Mahathir, who served twice for a total of 24 years as Malaysian premier, said French President Emmanuel Macron was "not demonstrating that he is civilized," adding that he was "very primitive."
"The French should teach their people to respect the feelings of other people. The Muslims have a right to punish the French since they have blamed all Muslims and the religion of the Muslims for what was done by one angry person."
"The boycott can not make up for the mistakes committed by the French all these years."
He did not make any direct reference to the attack in Nice.
His comments sparked widespread condemnation, with "outrageous" and "disgraceful" labeled by social media users.
Twitter initially flagged his tweet as "glorifying violence" about killing "millions of French people" but did not remove it.
The tweet was, however, deleted completely shortly afterward.
The beheading of Samuel Paty, the teacher, prompted Mr. Macron to pledge a crackdown against Islamic extremism.
But the move has inflamed tensions, with protests in several Muslim countries against France erupting, and some urging a boycott of French goods.