A knife-wielding man killed three people at a church in southern France Thursday, practically beheading a 60-year-old woman in what President Emmanuel Macron called an "Islamist terrorist attack."

The 21-year-old Tunisian migrant, who had a copy of the Koran and three knives with him, shouted "Allahu Akbar" (God is Greatest) when approached by police who shot and seriously wounded him, France's anti-terror prosecutor Jean-Francois Ricard told a press conference.

Nice Mayor
Nice is "once again the victim of Islamo-fascism" says the city's Mayor Photo: AFPTV / Fabien NOVIAL

The victims were "people targeted for the sole reason that they were present in this church at that moment," said Ricard.

The attack, he added, was a reminder that "the deadly ideology of Islamist terrorism is very much alive".

Nice Mayor Christian Estrosi told journalists at the scene the attacker "kept repeating 'Allahu Akbar' even while under medication" as he was taken to hospital.

Ricard said the attacker was a Tunisian, born in 1999, who had arrived in Italy on September 20, and then in France on October 9.

France terror attack
The knife attack took place inside the Basilica of Notre-Dame in the southeastern French city of Nice Photo: AFP / ERIC GAILLARD

In a bag he had left at the scene, investigators found two unused knives, and the prosecutor said police who shot him had "without any doubt prevented an even higher toll."

The killings, which occurred ahead of the Catholic holy day of All Saints Day on Sunday, prompted the government to raise the terror alert level to the maximum "emergency" level nationwide.

Churches across France sounded death knells, the traditional bell toll to mark a death, at 3:00 pm.

France terror attack
French police at the Basilica of Notre-Dame de Nice in southern France on Thursday, when a knifeman killed three people. Photo: AFP / Valery HACHE

Macron, who quickly travelled to Nice, announced increased surveillance of churches by France's Sentinelle military patrols, to be bolstered to 7,000 troops from 3,000.

Security at schools would also be boosted, he said.

"Quite clearly, it is France that is being attacked," the president added, vowing the country "will not give up on our values".

France has been the target of widespread anger in the Islamic world after Macron vowed to take the fight to radicals after the October 16 beheading of a history teacher by an extremist for having shown pupils cartoons of the Prophet Mohammed in a free speech lesson.

France terror attack
Churches across France sounded death knells, the traditional bell tolls to mark a death Photo: AFPTV / Colin BERTIER

But some claim Macron is unfairly targeting France's estimated five to six million Muslims -- the largest community in Europe.

Several Muslim-majority countries have launched campaigns to boycott French products, while protesters burnt the French flag and posters of Macron as demonstrations were held in Syria, Libya, Bangladesh, Afghanistan, Pakistan and the Palestinian territories.

Macron on Thursday urged people of all religions to unite and not "give in to the spirit of division".

Daniel Conilh, a 32-year-old waiter at Nice's Grand Cafe de Lyon, a block from the church, said it was shortly before 9:00 am when "shots were fired and everybody took off running."

"A woman came in straight from the church and said, 'Run, run, someone has been stabbing people'," he told AFP.

French anti-terror prosecutors are handling the inquiry into charges related to a "terrorist murder".

France has been on high alert since the January 2015 massacre at the satirical weekly magazine Charlie Hebdo marked the beginning of a wave of jihadist attacks that have killed more than 250 people.

Tensions have heightened since last month, when the trial opened for 14 suspected accomplices in that attack.

The paper marked the start of the court proceedings by republishing cartoons of the Prophet Mohammed that infuriated millions of Muslims worldwide -- the same caricatures that teacher Samuel Paty used as lesson material.

Days after the trial opened, an 18-year-old man from Pakistan seriously injured two people with a meat cleaver outside Charlie Hebdo's former offices in Paris.

After Thursday's attack, Malaysia's former prime minister Mahathir Mohamad tweeted that "Muslims have a right to be angry and to kill millions of French people for the massacres of the past".

Twitter later deleted his post.

Thursday also saw a Saudi citizen wound a guard in a knife attack at the French consulate in Jeddah while police in the French city of Lyon said they had arrested an Afghan spotted carrying a knife while trying to board a tram.

French foreign minister Jean-Yves Le Drian proffered "a message of peace to the Muslim world" Thursday, insisting France was a "country of tolerance."

Abdallah Zekri, director general of the French Council of Muslim Worship (CFCM) denounced Thursday's attack and urged French Muslims to cancel festivities to mark the Mawlid, or the Prophet's birthday, which ends Thursday, "in solidarity with the victims and their loved ones."

Copyright AFP. All rights reserved.