French President Emmanuel Macron has announced that he will more than double the number of soldiers deployed to protect against terror attacks after three people were killed at a church in Nice.

Mr Macron's decision to increase deployments from around 3,000 to 7,000 came hours after the stabbings at the Notre Dame basilica left three people dead.

The killings put France on its highest level of alert and come at a time of extreme tension over the republication of caricatures of the Prophet Mohammed by the satirical newspaper Charlie Hebdo.

A man armed with a knife attacked two women and a man at the church on Thursday morning before he was shot by police.

As he lay wounded, Nice's mayor said the attacker repeated "Allah Akbar!" over and over. French authorities have opened a terrorism investigation.

Prime Minister Jean Castex told French lawmakers that the country would raise its alert level to "emergency" in response to the attack. Mr Macron later travelled to Nice to meet police officers in the city.

READ MORE: Nice attack: Three dead in 'suspected terror attack' in France

The suspect was believed to be acting alone and police are not searching for other attackers.

Images on French media showed the neighbourhood locked down and surrounded by police and emergency vehicles. The killings took place less than half a mile from the site in 2016 where another attacker drive a truck into a Bastille Day crowd, killing dozens.

Shots punctuated the air and witnesses screamed as police stationed at the grandiose doors to the church appeared to fire at the attacker inside, according to videos obtained by The Associated Press.

Sounds of explosions could be heard as sappers exploded suspicious objects.
Later in the morning in the southern city of Avignon an armed man was shot dead by police after he refused to drop his weapon and a Taser shot failed to stop him, a police official said.

And a Saudi state-run news agency said a man stabbed a guard at the French consulate in Jiddah, wounding the guard before he was arrested. It was not immediately clear if the incidents were linked to the attack in Nice.