Updated

A police officer who shot and killed an unarmed motorist during a traffic stop in Cincinnati won't face a third trial, a prosecutor announced Tuesday.

Hamilton County Prosecutor Joe Deters said he was dropping the case against former University of Cincinnati officer Ray Tensing. Two previous juries couldn't reach a unanimous agreement on murder and voluntary manslaughter charges against the 27-year-old.

"This has been the most difficult decision of my career," Deters said.

Tensing shot Sam DuBose, 43, in the head after pulling him over for a missing front license plate on July 19, 2015. The officer, since fired, testified he feared he was going to be killed.

The prosecutor said he met with relatives of DuBose before making his decision public and described their reaction as "horrible," FOX 19 reported.

Cincy SHooting 2

Protesters chant as spectators arrive outside Nippert Stadium before a soccer game during a demonstration on the University of Cincinnati campus demanding that a white former police officer be tried a third time in the fatal shooting of an unarmed black motorist, Wednesday, June 28, 2017, in Cincinnati (AP Photo/John Minchillo)

The 2015 shooting sparked protests in the city, with groups such as Black Lives Matter getting involved. DuBose's family and several civil rights groups called for a third trial of Tensing. There have been several demonstrations and protests urging a third trial, and petition drives both for and against the idea.

Ghiz declared a mistrial June 23 after the jury reported it was deadlocked after more than 30 hours of deliberations over five days. His second jury had nine whites and three blacks. The first had 10 whites and two blacks. They deliberated some 25 hours over four days in November before a mistrial was declared.

Prosecutors said the first jury had a solid majority in favor of convicting Tensing for voluntary manslaughter, while defense attorney Stewart Mathews said majorities of the second jury favored acquittal on both charges.

Deters said the case had been referred to federal prosecutors for them to determine if DuBose's civil rights had been violated, something DuBose's family had previously urged.

"I'm hopeful that the U.S. attorney's office will see fit to proceed in this matter," Deters added.

Read more from FOX 19.

Cincy Shooting 3

Protesters holds signs as they gather for a demonstration on the University of Cincinnati campus demanding that a white former police officer be tried a third time in the fatal shooting of an unarmed black motorist, Wednesday, June 28, 2017, in Cincinnati. (AP Photo/John Minchillo)

The Associated Press contributed to this report.