More details on the knife attack in France were revealed late Thursday by the country's chief anti-terrorist prosecutor.
The man suspected of killing three people at a church in Nice earlier in the day was born in 1999 and from Tunisia.
Prosecutor Jean-Francois Ricard says the man arrived by train from Italy.
He changed his clothes at the station, which was caught on camera, then walked a quarter mile to the church where he carried out his attack shortly before 8:30 in the morning.
Ricard says authorities arrived about half an hour later.
"A team of four local police officers intervened," he said. 'Witness statements of first responders indicate that the man moved towards them in a threatening manner shouting 'Allahu Akbar' obliging them to use a taser before shooting several times with their guns."
Two of the three victims died on the spot, while the third managed to make it out of the church into a nearby cafe, where she eventually died.
"The assailant was was transported to a hospital to be operated on, he is very seriously wounded, he is still in a life-threatening condition," said Ricard.
Nice's mayor said the attack was similar to the beheading of teacher Samuel Paty by a Chechen man earlier this month near Paris. Paty used cartoons of the Prophet Mohammad in a civics class about freedom of expression.
Thursday's attacks, on the birthday of the Prophet Mohammad came at a time of growing Muslim anger around the globe at France's defence of the right to publish the cartoons.