The former Malaysian prime minister openly called for "killing millions of French people" in a tweet.

These comments were made just after the terrorist attack at Nice Cathedral where three people were killed, before Twitter moderated his comments on the network.

Former Malaysian Prime Minister Mahathir Mohamad said on Thursday that Muslims had the right "to kill millions of French people" shortly after a knife attack in Nice.

Three people were killed Thursday, including at least one butchered, in a church in Nice during an attack considered by the French authorities to be terrorist.

Shortly thereafter, the prime minister of Malaysia, a predominantly Muslim country until the fall of his government in February, posted inflammatory comments on his Twitter account.

Referring to the October 16 beheading of a French teacher who had shown caricatures of the Prophet Muhammad to his students as part of his teaching, Mahathir Mohamad said he did not approve of the attack but that freedom of expression did not include "insults to others".

"Whatever religion is involved, people who are angry kill," said the 95-year-old ex-prime minister, who has made controversial statements about Jews and homosexuals in the past.

"During their history, the French have killed millions of people. Many were Muslims. Muslims have the right to be angry and to kill millions of French people for the massacres of the past," he added. . 

He describes President Macron as "very primitive"

Mahathir Mohamad, who twice held the office of Prime Minister for a cumulative period of 24 years, judged French President Emmanuel Macron to be "very primitive" in other tweets.

"The French should teach their citizens to respect the feelings of others. Since we accuse all Muslims and the religion of Muslims for what an angry person has done, Muslims have the right to punish the French," he continued.

"The boycott cannot compensate for the misdeeds committed by the French all these years".

Comments calling for "killing millions of French people" have since been deleted by Twitter.

However, the other tweets are still online. 

He made no reference to the attack in Nice, committed according to a French source close to the investigation to the cry of "Allah Akbar" ("God is the greatest", in Arabic).

After the beheading of the French teacher, Samuel Paty, by an 18-year-old Chechen Russian, Emmanuel Macron promised that France would not renounce cartoons, in the name of freedom of expression.

His remarks have led to strong tensions in several Muslim countries, ranging from massive demonstrations to boycott of French products.