Two French officials say the gunman who shot and killed a police officer on the Champs-Elysees was detained in February for threatening police then freed.
The officials spoke on Friday to The Associated Press on condition of anonymity because they weren't authorised to publicly discuss details of the probe into Thursday night's attack.
The officials said the gunman was detained toward the end of February after speaking threateningly about the police but then released for lack of evidence.
French prosecutors opened a terrorism investigation after three police officers were shot along the central Parisian boulevard, the Champs-Elysees.
A 37-year-old police officer died at the scene and two others were seriously wounded in the attack. That differed from earlier reports that said two police officers had died.
Interior ministry spokesman Pierre-Henry Brandet said it was clear the police officers had been deliberately targeted.
"A little after 9pm a vehicle stopped alongside a police car which was parked. Immediately a man got out and fired on the police vehicle, mortally wounding a police officer."
READ MORE: Trump labels Paris attack 'terrorism'
The wide avenue that leads away from the Arc de Triomphe had been crowded with Parisians and tourists enjoying a spring evening but was quickly cleared by police.
"The sense of duty of our policemen tonight averted a massacre ... they prevented a bloodbath on the Champs Elysees," Interior Minister Matthias Fekl told reporters.
Are you a New Zealander in Paris who witnessed the incident? Email us at firstname.lastname@example.org
Islamic State has claimed responsibility for the deadly attack, according to Amaq - a news agency with an apparent association with the terrorist group. It named the attacker as Abu Yousif.
ATTACK LAUNCHED FROM CAR
The attack was launched from a car, when one of the assailants opened fire on a police van at a red light, killing an officer inside.
Witness Chelloug, a kitchen assistant, said he was walking out of a shop and saw a man get out of a car and open fire with a rifle on a policeman.
"The policeman fell down. I heard six shots, I was afraid. I have a 2-year-old girl and I thought I was going to die... He shot straight at the police officer."
Paris Prosecutor Francois Molins said the gunman who was killed at the scene had been identified and police were on Friday hunting a second suspect in connection with the fatal shooting.
A Belgian man who had been linked by some as an accomplice to the terror attack turned himself in, but authorities said there was no link. Belgian Justice Minister Koen Geens told VRT network early Friday that "at this moment we have no information about Belgian links."
Belgian interior minister Jan Jambon told the VRT network the gunman was a French national.
HOME OF KARIM CHEURFI SEARCHED
Investigators searched a home on Friday afternoon in an eastern suburb of Paris believed to be linked to the attack.
A police document obtained by AP identifies the address searched in the town of Chelles as the family home of Karim Cheurfi, a 39-year-old with a criminal record.
Police tape surrounded the quiet, middle-class neighbourhood in Chelles, and worried neighbours expressed surprise at the searches.
Archive reports by French newspaper Le Parisien say that Cheurfi was convicted of attacking a police officer in 2001.
Police have detained for questioning three family members of the suspected gunman but the prosecutors' office stressed on Friday that questioning family members is routine in such cases, as investigators seek to determine whether the gunman was acting alone, where he got his weapons and other details.
HOLLANDE CONVINCED IT'S TERROR
French President Francois Hollande said he was convinced the circumstances of the Paris shooting pointed to a terrorist act. Hollande scheduled an emergency meeting following the shootings.
One witness said he heard six shots fired, and saw the police officer hit the ground.
"I came out of the Sephora shop and I was walking along the pavement where an Audi 80 was parked. A man got out and opened fire with a kalashnikov on a policeman," witness Chelloug, a kitchen assistant, said.
"The policeman fell down. I heard six shots, I was afraid. I have a two year-old girl and I thought I was going to die … He shot straight at the police officer."
US President Donald Trump said it was a "very, very terrible thing".
"It looks like another terrorist attack. What can you say? It just never ends. We have to be strong."
THREE DAYS BEFORE THE VOTE
The attack comes three days before the first round of France's tense presidential election.
Security is high before the vote after police said they arrested two men on Tuesday in what they described as a thwarted terror attack.
France has lived under a state of emergency since 2015 and has suffered a spate of Islamist militant attacks, mostly perpetrated by young men who grew up in France and Belgium, which have killed more than 230 people in the past two years.
- Reuters and AP