PARIS/NEW YORK -- Former Malaysian Prime Minister Mahathir Mohamad sent out a series of tweets Thursday over the recent killing of a French teacher who used cartoons of the Prophet Muhammad in a classroom, writing that he believed in freedom of expression but that it should not be used to insult others.
One of his more controversial tweets said that Muslims have a right to "kill millions of French people for the massacres of the past." That tweet was later removed by Twitter on grounds that it violated the social media platform's rules.
The French teacher was slain this month after showing cartoons of Muhammad in a class on freedom of expression. The suspect, shot dead by police, was a student from Chechnya, an area of Russia with a large Muslim population.
Mahathir's comments also follow a knife attack Thursday inside the Notre Dame basilica in Nice that left at least three people dead, according to local media.
Mahathir, 95, is a longtime Malaysian leader and a respected figure in the Muslim world.
"The killing is not an act that as a Muslim I would approve," he wrote, but added that limits exist on freedom of expression. "You cannot go up to a man and curse him simply because you believe in freedom of speech."
He took issue with French President Emmanuel Macron for pointing a finger at Islam as a whole in recent attacks.
"Macron is not showing that he is civilised [sic]. He is very primitive," Mahathir wrote.
Mahathir then noted that the French in their history have "killed millions of people. Many were Muslims." He also said: "Muslims have a right to be angry and to kill millions of French people for the massacres of the past."
"Since you have blamed all Muslims and the Muslims' religion for what was done by one angry person, the Muslims have a right to punish the French," he added.
In Thursday's basilica killings, Nice Mayor Christian Estrosi told reporters there is "no doubt" that the incident was a case of Islamic terrorism, and anti-terrorism authorities have opened an investigation.
Macron visited the site of the attack later in the day.
Prime Minister Jean Castex said the country has raised its terrorism alert level to "emergency," the highest in France's three-tier system.
"I can only, once again in the very difficult circumstances that our country is going through, in the challenges it is undergoing, call on the entire national representation to unity and cohesion," he told lawmakers.
Other leaders including U.K. Prime Minister Boris Johnson and European Commission President Ursula von der Leyen posted statements on Twitter condemning the attack.
According to media reports, several people were stabbed inside and outside the church. The suspect was shot by police and taken to a hospital.
After his arrest, the suspect shouted "Allahu akbar," or "God is greatest" in Arabic, Estrosi said.
France's BFM TV news channel reported that one woman and a male church warden died at the scene, and that a second woman fled but died from her injuries at a nearby bar. The woman who died at the church was nearly beheaded, according to radio station Europe 1.
Also on Thursday, a man threatening passersby with a handgun near the French city of Avignon was shot and killed by police. There were no other casualties. He was shouting "Allahu akbar," according to Europe 1.
On the same day, France's foreign ministry reported that a guard was stabbed at the French consulate in Jiddah, Saudi Arabia. A Saudi suspect was arrested, and the guard was hospitalized in stable condition.
France has seen a string of terrorist incidents since last month, when satirical magazine Charlie Hebdo republished caricatures of the Prophet Muhammed that had led to a 2015 attack at the publication's offices. A Pakistani man stabbed two people outside the former Charlie Hebdo headquarters in late September.
Paris has moved to crack down on what Macron has called "Islamic separatism." But its efforts -- which include shutting down mosques, disbanding Islamic organizations and banning homeschooling -- have sparked a backlash among many Muslim-majority nations and spurred boycotts of French goods.