You are not permitted to download, save or email this image. Visit image gallery to purchase the image.
A defiant President Emmanuel Macron, declaring that France had been subject to an Islamist terrorist attack, said he would deploy thousands more soldiers to protect important 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."
A police source told Reuters the assailant was believed by law enforcement to be a 21-year-old Tunisian national who had recently entered France from Italy.
Tunisia's anti-terrorism court prosecutor began a forensic investigation into "the suspicion that a Tunisian committed a terrorist operation abroad", Mohsen Dali, spokesman for the specialised counter-militancy court, said in Tunis.
In Saudi Arabia, meanwhile, state television reported that a Saudi man had been arrested in the Red Sea city of Jeddah after attacking and injuring a guard at the French consulate. The French Embassy said he was in hospital after a knife assault though his life was not in danger.
Within hours of the Nice attack, French police killed a man who had threatened passersby with a handgun in Montfavet, near the southern 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.
Thursday's attacks, on the birthday of the Prophet Mohammad, came at a time of growing Muslim anger at France's defence of the right to publish the cartoons, and protesters have denounced France in street rallies in several Muslim-majority countries.
After the Nice attack, Prime Minister Jean Castex raised France's security alert to its highest level.
Estrosi said the Nice attacker had repeatedly shouted "Allahu Akbar" even being detained by police.
At around 9am , 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.
"Enough is enough. 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 Avenue Jean Medecin, the French Riviera city's main shopping thoroughfare. Ambulances and fire service vehicles were also at the scene.
Condemnations of the attack came from Britain, the Netherlands, Italy, Spain, Saudi Arabia and Turkey, whose President Tayyip Erdogan earlier this week slammed Macron and France over displays of the Prophet Mohammad.
Turkish Presidential Communications Director Fahrettin Altun said Islam could not be used in the name of terrorism, adding: "We call on the French leadership to avoid further inflammatory rhetoric against Muslims and focus, instead, on finding the perpetrators of this and other acts of violence."
In Paris, lawmakers in the National Assembly observed a minute's silence. The mayor of Paris, Anne Hidalgo, said the people of Nice "can count on the support of the city of Paris and of Parisians".
A representative of the French Council for the Muslim Faith also 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, celebrated on Thursday.
The foreign ministry of Saudi Arabia, the birthplace of Islam, said "extremist acts" such as that in Nice "contravene all religions, while stressing "the importance of avoiding all practices which generate hatred, violence and extremism".
France is still reeling from the killing by a man of Chechen origin of schoolteacher Paty in a Paris suburb earlier this month. The assailant said he wanted to punish Paty for showing pupils cartoons of the Prophet Mohammad to his pupils.
France, with Europe's largest Muslim community, has suffered a string of Islamist militant attacks in recent years, including bombings and shootings in 2015 in Paris that killed 130 people and a 2016 attack in Nice in which a militant drove a truck through a seafront crowd celebrating Bastille Day, killing 86.