In Saudi Arabia on Thursday, state television reported that a Saudi man had been arrested in the city of Jeddah after attacking and injuring a guard at the French consulate.
The French Embassy said the consulate was subject to an “attack by knife which targeted a guard”, adding the guard was taken to hospital and his life was not in danger.
Nice’s mayor, Christian Estrosi, who described the attack in his city as terrorism, said on Twitter it had happened in or near Notre Dame church and was similar to the beheading of French teacher Samuel Paty in an attack this month in Paris.
Estrosi said the attacker had repeatedly shouted the phrase “Allahu Akbar”, even after he had been detained by police.
One of the people killed inside the church was believed to be the church warden, Estrosi said, adding that a woman had tried to escape from inside the church and had fled into a bar opposite the 19th century neo-Gothic building.
“The suspected knife attacker was shot by police while being detained, he is on his way to hospital, he is alive,” Estrosi told reporters.
“Enough is enough,” Estrosi said. “It’s time now for France to exonerate itself from the laws of peace in order to definitively wipe out Islamo-fascism from our territory.”
Reuters journalists at the scene said police armed with automatic weapons had put up a security cordon around the church, which is on Nice’s Jean Medecin avenue, the city’s main shopping thoroughfare. Ambulances and fire service vehicles were also at the scene.
French President Emmanuel Macron is due to visit Nice, Estrosi said.
In Paris, lawmakers in the National Assembly observed a minute’s silence in solidarity with the victims. The mayor of Paris, Anne Hidalgo, said the people of Nice “can count on the support of the city of Paris and of Parisians”.
Police said three people were confirmed to have died in the attack and several were injured. The French anti-terrorist prosecutor’s department said it had been asked to investigate.
A police source said a woman was decapitated. French far-right politician Marine Le Pen also spoke of a decapitation having occurred in the attack.
A representative of the French Council for the Muslim Faith strongly condemned the attack. “As a sign of mourning and solidarity with the victims and their loved ones, I call on all Muslims in France to cancel all the celebrations of the holiday of Mawlid.”.
The holiday is the birthday of the Prophet Mohammad, which is being celebrated today.
Estrosi said the victims had been killed in a “horrible way”.
“The methods match, without doubt, those used against the brave teacher in Conflans Sainte Honorine, Samuel Paty,” he said, referring to a French teacher beheaded earlier this month in an attack in a suburb of Paris.
The attack comes while France is still reeling from the beheading earlier this month of middle school teacher Paty by a man of Chechen origin.
The attacker had said he wanted to punish Paty for showing pupils cartoons of the Prophet Mohammad in a civics lesson.
It was not immediately clear if Thursday’s attack was connected to the cartoons, which Muslims consider to be blasphemous.
Since Paty’s killing, French officials - backed by many ordinary citizens - have re-asserted the right to display the cartoons, and the images have been widely displayed at marches in solidarity with the killed teacher.
That has prompted an outpouring of anger in parts of the Muslim world, with some governments accusing Macron of pursuing an anti-Islam agenda.
In a comment on recent beheadings in France, the Kremlin said on Thursday it was unacceptable to kill people, but also wrong to insult the feelings of religious believers.