French police shot dead a man wielding a meat cleaver after he tried to enter a police station, the anniversary of militant attacks in Paris.
He was shouting, "Allahu akbar" (God is Great), and wearing what turned out to be a fake suicide belt.
Paris Prosecutor Francois Molins said the man was also carrying a mobile phone and a sheet of paper bearing the Islamic State flag and a claim of responsibility by the militant group written in Arabic.
A judicial source said Ali Sallah, was a Moroccan born in 1995 in Casablanca. He was homeless and known to police for theft in 2012 in the Var region of southern France.
French Justice Minister Christiane Taubira told French television i-Tele on Thursday that from what was known so far, the man had no known links to violent Islamist radicalism.
She suggested he might have been mentally unstable.
Thursday is the first anniversary of deadly Islamist attacks on the Charlie Hebdo satirical magazine in the French capital and Sallah's attack came just minutes after President Francois Hollande had given a commemoration speech elsewhere in Paris.
Security concerns intensified further in France in November when 130 people were killed in shootings and suicide bombings targeting a Paris music hall, bars, restaurants and a stadium.
Those attacks were claimed by Islamic State, the militant group that controls swathes of Iraq and Syria. Several of the militants involved were, like the Hebdo killers, French born.
Molins said a terrorism inquiry had been opened into Thursday's attack.
A police official said, "(The man) shouted 'Allahu akbar' and had wires protruding from his clothes. That's why the police officer opened fire."
French Interior Ministry spokesman Pierre-Henry Brandet later said the suicide belt the man was wearing was fake.
Journalist Anna Polonyi, who could see the outside of the police station from the window of her flat, posted photos on social media that showed what appeared to be a bomb-disposal robot beside the body of the man, who was wearing jeans and a grey coat.
Polonyi told Reuters that her sister, in the flat with her, had seen the incident. She said the police had shouted at the man and that they shot him as he was running towards them.
Separately on Thursday a French court sentenced a French-born Islamist militant in absentia to 15 years in jail for his role in recruiting militants to fight for the group in Syria in 2013.
The whereabouts of Salim Benghalem, 35, who is believed to have had links to the perpetrators of both series of Paris attacks, remain unknown. He is suspected of being an Islamic State executioner and of having led a group of French-speaking jihadis in Raqqa, Syria.
The French court sentenced six other defendants at Thursday's hearing to jail terms of between six and nine years for being part of the recruitment network.
It was the first such court case involving militant Islamists in France since the November killings.