A knife-wielding attacker beheaded a woman and killed two other people at a church in the French city of Nice on Thursday.
A defiant President Emmanuel Macron, declaring that France had been subject to a terrorist attack, said he would deploy thousands more soldiers to protect key French sites, such as places of worship and schools.
Speaking from the scene, he said France had been attacked "over our values, for our taste for freedom, for the ability on our soil to have freedom of belief".
"And I say it with lots of clarity again today: we will not give any ground."
Within hours of the Nice attack, police killed a man who had threatened passersby with a handgun in Montfavet, near the southern French city of Avignon.
France's Le Figaro newspaper quoted a prosecution source as saying the man was undergoing psychiatric treatment, and that they did not believe there was a terrorism motive.
Nice's mayor, Christian Estrosi, said the attack in his city had happened at Notre Dame church and was similar to the beheading earlier this month near Paris of teacher Samuel Paty, who had used cartoons of the Prophet Mohammad in a civics class.
At around 9 a.m. (0800 GMT), a man armed with a knife entered the church and slit the throat of the sexton, beheaded an elderly woman, and badly wounded a third woman, according to a police source.
The sexton and the elderly woman died on the spot, the third woman managed to make it out of the church into a nearby cafe, where she died, Estrosi told reporters. None of the victims has so far been named.
"The suspected knife attacker was shot by police while being detained. He is on his way to hospital, he is alive," he said.