NANTES, France — A police officer who fatally shot a young man in western France this week, setting off three nights of rioting, has been charged with manslaughter, his lawyer said on Friday.

The officer had initially claimed that he acted in self-defense while trying to arrest a 22-year-old man in Nantes on Tuesday, but later said that he had fired his weapon by accident.

“He recognizes he made a statement that did not conform with the truth,” said his lawyer, Laurent-Franck Lienard. The officer was granted conditional release.

The victim, identified by the single name Aboubakar, died from a bullet wound to the neck after the police stopped his car in the Breil neighborhood, which is home to a large public housing complex. The police said Aboubakar had been under surveillance.