A police officer being investigated in the killing of a 17-year-old of North African origin that touched off riots around France was freed from jail Wednesday while the probe continues.

The prosecutor’s office in the Paris suburb of Nanterre, where Nahel Merzouk was shot, said magistrates concluded that continued detention of the motorcycle officer "no longer fulfills the legal criteria" for which he was held.

The officer, who has been identified only as Florian M., was jailed June 29, two days after Merzouk was killed.

PARIS VOTERS WEIGH SUV PARKING FEE HIKE AS MAYOR PURSUES LATEST ANTI-CAR CRACKDOWN

The teenager was shot during a traffic stop in Nanterre. Video showed two officers at the window of the Mercedes the youth was driving, one with his gun pointed at the teenager. As the car pulled forward, the officer fired once.

The officer was given a preliminary charge of voluntary homicide, which means there must be further investigation before an eventual decision to put him on trial.

Merzouk riot scene

The site of a riot over the killing of Nahel Merzouk is photographed in France, Friday, June 30, 2023 (AP Photo/Aurelien Morissard, File)

The judges on Wednesday ordered the police officer to stay out of Nanterre and forbade him from possessing a weapon or having contact with witnesses or civil parties in the case, the prosecutor's office said. He must regularly report to authorities.

Lawyers for the officer had made pleas for his release, but all were turned down until a new demand a week ago.

The riots again highlighted the frustration of many residents of poor suburbs in France with a high rate of people of immigrant origin.

CLICK HERE TO GET THE FOX NEWS APP

The rioting was driven by a mainly teenage backlash against a French state that many with immigrant roots say routinely discriminates against them.