France's interior minister has said more militant attacks on its soil are likely and the country is engaged in a war against Islamist ideology following the second deadly knife attack in its cities in two weeks.

Gerald Damarnin was speaking a day after an assailant shouting "Allahu Akbar" (God is Greatest) beheaded a woman and killed two other people in a church in Nice.

The man was shot by police and is now in critical condition in hospital.

"We are in a war against an enemy that is both inside and outside," Mr Damarnin told RTL radio.

"We need to understand that there have been and there will be other events such as these terrible attacks."

President Emmanuel Macron has deployed thousands of soldiers to protect important sites such as places of worship and schools, and France's security alert is at its highest level.

Yesterday's attack, on the birthday of the Prophet Mohammed, took place at a time of growing Muslim anger around the world at France's defence of the right to publish cartoons depicting the prophet.

Protesters who deem the cartoons an insult to Mohammed have denounced France in street rallies in several Muslim-majority countries.

Tens of thousands of people protested in Bangladesh today, chanting slogans such as "Boycott French products" and carrying banners calling Mr Macron "the world's biggest terrorist" as they marched in the streets of the capital Dhaka.

France's chief anti-terrorism prosecutor said the man suspected of carrying out the Nice attack was a Tunisian born in 1999 who had arrived in Europe on 20 September in Lampedusa, the Italian island off Tunisia that is a main landing point for migrants from Africa.

A Tunisian security source and a French police source named the suspect as Brahim Aouissaoui.

A judicial source said that a 47-year-old man had been taken into custody on suspicion of having been in contact with the perpetrator of the attack.

The Nice attack occurred just under two weeks after Samuel Paty, a school teacher in a Paris suburb, was beheaded by an 18-year-old Chechen who was apparently incensed by the teacher showing a cartoon of the Prophet Mohammad in class.

It was also the second miliant attack in Nice in recent years. In July 2016, a militant drove a truck through a seafront crowd celebrating Bastille Day, killing 86 people.

People gathered in front of the Notre-Dame church today to lay flowers and light candles.

Frederic Lefevre attached heart-shaped balloons to the church gate. "I knew him very well, the person who was killed in the church," he said.

"I'm from Nice and this is a tragedy once again. We're a free country. Let's love freedom - that's a message to the world. Life should be spiritual. No god should kill".

Another Nice resident, Marc Mercier, said: "It took place in the day to people who weren't asking for it. It's appalling."

Mr Macron said France had been attacked "over our values, for our taste for freedom, for the ability on our soil to have freedom of belief ... we will not give any ground."

At the protest in Dhaka, however, demonstrators accused Mr Macron of promoting Islamophobia.

"He doesn't know the power of Islam. The Muslim world will not let this go in vain. We'll rise and stand in solidarity against him," said one, Akramul Haq.

Floral tributes are laid outside the church in Nice

French prosecutor Jean-Francois Ricard said the suspected attacker had entered Nice by train early on yesterday morning and made his way to the church, where he stabbed and killed the 55-year-old sexton and beheaded a 60-year-old woman.

He also stabbed a 44-year-old woman, who fled to a nearby cafe where she raised the alarm before dying, Mr Ricard said.

Police then arrived and confronted the attacker, who was still shouting "Allahu Akbar", and shot and wounded him.

In the Tunisian city of Sfax, the suspect's family said he had spoken to them on a video call outside the church hours before the attack, but he had shown no sign that he planned any violence.

Brahim Aouissaoui had gone to the Notre-Dame church soon after arriving in Nice looking for a place to sleep, his sister Afef said. He said he planned to rest in a building opposite the church.

Family members said they were shocked at the idea that he had committed such a violent crime.

"My brother is a friendly person and never showed extremism," his older brother Yassin said. "He respected all other people and accepted their differences even since he was a child."

Tunisia said he was not listed by police there as a suspected militant and authorities have begun their own investigation.

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 the 2016 attack in Nice.