Paris: Nice’s mayor, Christian Estrosi, who described the attack as terrorism, said on Twitter it had happened in or near the city’s Notre Dame church and that police had detained the attacker.
Estrosi said the attacker had shouted the phrase “Allahu Akbar”, or God is greatest.
One of the people killed inside the church was believed to be the church warden, Estrosi said.
The attacker kept shouting “Allahu Akbar” even after he had been detained, Estrosi said.
“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.”
Police said three people were confirmed to have died in the attack and several were injured.
A police source said a woman was decapitated. French politician Marine Le Pen also spoke of a decapitation having occurred in the attack.
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.
Giving a toll that differed from figures from the police and French media, Estrosi said he could confirm that two people had died. He said a third person, a woman who was gravely injured, had tried to escape from inside the church and had fled into a bar opposite the building.