Malaysia's former prime minister Mahathir Mohamad said on Thursday that Muslims had a right "to kill millions of French people", shortly after a knife-wielding man launched a deadly attack in Nice.
Three people were killed at a church in the southern French city, with the attacker slitting the throat of at least one of them, in what authorities were treating as the latest jihadist attack to rock the country.
Shortly afterwards, Mahathir — who was prime minister of Muslim-majority Malaysia until his government collapsed in February — launched an extraordinary outburst on Twitter.
Referring to the beheading of a French teacher who showed pupils cartoons of the Prophet Mohammed, Mahathir said he did not approve of that attack but that freedom of expression does not include "insulting other people".
"Irrespective of the religion professed, angry people kill," said the outspoken 95-year-old, who has in the past drawn controversy for remarks attacking Jews and the LGBT community.
"The French in the course of their history has killed millions of people. Many were Muslims. Muslims have a right to be angry and to kill millions of French people for the massacres of the past."
Mahathir, who served as Malaysian premier twice for a total of 24 years, said that French President Emmanuel Macron was "not showing that he is civilised", adding he was "very primitive".
"The French should teach their people to respect other people's feelings. 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.
"The boycott cannot compensate the wrongs committed by the French all these years." He made no direct reference to the Nice attack. The beheading of the teacher, Samuel Paty, prompted Macron to promise a crackdown on Islamic extremism.
But the move has inflamed tensions, with protests against France erupting in several Muslim countries, with some urging a boycott of French goods.