A knife-wielding man killed three people at a church in the French city of Nice on Thursday, slitting the throat of at least one, in what President Emmanuel Macron called a "Islamist terrorist attack".
The assailant was shot and wounded by police, Nice's Mayor Christian Estrosi said.
"He kept repeating 'Allahu Akbar' (God is Greatest) even while under medication" as he was brought to hospital, Estrosi told journalists.
The body of a woman whose throat had been cut in an apparent beheading attempt was found inside the Basilica of Notre-Dame, in the heart of the Mediterranean resort city, a source close to the inquiry said.
The body of a man, a church employee of about 45 years old, was also found inside the church, while another woman succumbed to her injuries after seeking refuge in a nearby bar.
Father Philippe Asso, who serves at the basilica, said no mass was underway at the time of the attack, but the church opens around 8am (0700 GMT) and "people come in to pray at all hours."
Churches across France sounded death knells, the traditional bell tollings to mark a death, at 3:00 pm.
The killings, which occurred just ahead of the Catholic holy day of All Saints Day on Sunday, prompted the government to raise the terror alert level to maximum countrywide.
Shortly afterwards, police in Lyon said they had arrested an Afghan who was spotted carrying a 30-centimetre (12-inch) knife while trying to board a tram.
Macron, who quickly travelled to Nice, announced increased surveillance of churches by France's Sentinelle military patrols, which would be bolstered to 7,000 troops from 3,000.
"Quite clearly, it is France that is being attacked," he said. "If we are attacked, it is because of our values."
- Tensions high -
Police sources said the suspect gave his name as "Brahim" and his age as 25, but his identity had yet to be confirmed.
Daniel Conilh, a 32-year-old waiter at the Grand Cafe de Lyon, a block from the church, said it was shortly before 9am 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 have taken over the inquiry.
France has been on high alert since the January 2015 massacre at the satirical weekly magazine Charlie Hebdo which 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.
Just days later, an 18-year-old man from Pakistan seriously injured two people with a meat cleaver outside Charlie Hebdo's former offices in Paris.
And two weeks ago, the history teacher Samuel Paty was beheaded outside his school in a Paris suburb after he showed some of the Mohammed cartoons to students as part of a course on free speech.
The assailant, an 18-year-old Chechen named Abdullakh Anzorov, apparently acted after some angry parents denounced the teacher on social media.
- 'Act of cowardice' -
Paty's murder prompted Macron to promise a crackdown on Islamic extremism, including shutting down mosques and organisations accused of fomenting radicalism and violence.
But the move has inflamed tensions with many Muslims saying Macron is unfairly targeting France's estimated five to six million Muslims -- the largest community in Europe.
Protests against France have erupted in several Muslim countries, with some urging a boycott of French goods.
Adding to the nervousness, a Saudi citizen wounded a guard in a knife attack at the French consulate in Jeddah on Thursday.
In Nice, painful memories remain fresh of a jihadist attack during Bastille Day fireworks on July 14, 2016, when a man rammed his truck into a crowded promenade, killing 86 people.
Just a few days later, two teenagers murdered an 85-year-old priest as he conducted mass at his church in Saint-Etienne-du-Rouvray in northern France, an attack later claimed by the Islamic State group.
Abdallah Zekri, director general of the French Council of Muslim Worship (CFCM), said: "I can only denounce as strongly as possible this act of cowardice against the innocent."
Zekri called on 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."