“The cowardly attack... will not shake the common front defending the values of freedom and peace,” Conte posted on Twitter.

“Our convictions are stronger than fanaticism, hatred and terror.”

Foreign Minister Luigi Di Maio also took to social media to condemn the attack and voiced support for France.

“Italy expresses profound condolences for the barbarous Nice attack,” Di Maio tweeted.

“We are close to the French people and to the pain of the families of the victims.

“Italy repudiates all forms of extremism and remains at France’s side in the fight against terrorism and all violent radicalism.”

French terrorism prosecutors opened an investigation following the attack, which took place at the Notre-Dame church in Nice at around 9:00 am on Thursday morning.

Local authorities detained the suspected attacker quickly after the event, Mayor Christian Estrosi said.

France’s chief anti-terror prosecutor Jean-François Ricard said the attacker was a Tunisian national, born in 1999, who had recently entered France from Italy.

Ricard said the attacker arrived in Italy by reaching the Mediterranean island of Lampedusa on September 20, and then travelled to Paris on October 9.

The travel information came from an Italian Red Cross document found on the attacker, he said.

Italian media reported that the attacker spent two weeks in quarantine on a ship off the eastern coastal town of Bari in September, before being expelled from Italy and heading to Paris.

France has become the target of Islamist threats and attacks since teacher Samuel Paty was beheaded in broad daylight on October 16 after showing controversial cartoons of the Prophet Mohamed which have been deemed blasphemous.

The cartoons led to the January 2015 attack on the Paris office of the Charlie Hebdo satirical magazine, in which 12 people were shot dead.