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.

Relatives of the victims of a knife gathered outside the Basilica of Notre-Dame in Nice
Relatives of the victims of a knife gathered outside the Basilica of Notre-Dame in Nice AFP / Valery HACHE

In a near half-hour frenzy in the Notre-Dame basilica in the centre of Nice, the assailant used a knife of 30 centimetres (12 inches) to cut the throat of a 60-year-old woman so deep that he practically beheaded her, said Ricard. She died inside the church.

The body of a man, a 55-year-old church employee, was found nearby inside the basilica, his throat also slit.

Another woman, a 44-year-old who had fled the church to a nearby restaurant, died shortly afterwards from multiple knife wounds.

Nice is "once again the victim of Islamo-fascism" says the city's Mayor
Nice is "once again the victim of Islamo-fascism" says the city's Mayor 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.

A map of central Nice locating the knife attack
A map of central Nice locating the knife attack AFP / Simon MALFATTO

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.

The knife attack took place inside the Basilica of Notre-Dame in the southeastern French city of Nice
The knife attack took place inside the Basilica of Notre-Dame in the southeastern French city of Nice 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.

French police at the Basilica of Notre-Dame de Nice in southern France on Thursday, when a knifeman killed three people.
French police at the Basilica of Notre-Dame de Nice in southern France on Thursday, when a knifeman killed three people. 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.

A woman kneels by a police car and cries in Nice after the attack
A woman kneels by a police car and cries in Nice after the attack AFP / Valery HACHE

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.

Churches across France sounded death knells, the traditional bell tolls to mark a death
Churches across France sounded death knells, the traditional bell tolls to mark a death 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."