The man reportedly shouted âAllahu akbarâ (God is great), a religious phrase often co-opted by Islamist extremists, before carrying out the attack.
Hours later, a man wielding a handgun was shot dead by police near Avignon, around 250km away. He is believed to have been a member of the far-right GÃ©nÃ©ration identitaire movement.
After the attacks, president Emmanuel 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", and pledged thousands more soldiers would be deployed to protect key sites, such as places of worship and schools.
"And I say it with lots of clarity again today: we will not give any ground," he added.
Mr Macron also tweeted: âIn France, there is only one community - the national community,â and âWhatever your religion, believer or not, we must unite at these times.â He told the people of Nice: âWe wonât give in to any terrorist thinking."