A man convicted in the shooting death of an undercover police detective and his confidential informant 2 1/2 years ago in Ohio has been sentenced to 50 years to life.

David McDaniel, 21, was 18 when prosecutors said he and two other people tried to rob Det. James Skernivitz and Scott Dingess after seeing them handling money in an unmarked police car parked at a West Side strip mall in Cleveland in September 2020.

Authorities said 53-year-old Skernivitz tried to drive away but McDaniel and another defendant opened fire, killing him and 50-year-old Dingess. Authorities said the group didn't know that Skernivitz was an undercover Cleveland police detective.

CLEVELAND SHOOTING: PAIR CHARGED WITH MURDERING 2, INCLUDING POLICE DETECTIVE, IN UNMARKED CAR

Cuyahoga County Common Pleas Court Judge Michael Shaughnessy sentenced McDaniel on Thursday to a life term with parole eligibility after 50 years, telling the defendant "Over a few dollars, look at the destruction you caused," Cleveland.com reported. The victims had about $80 on them, prosecutors said.

Ohio Fox News graphic

David McDaniel, a man who was involved in a shooting that killed two people, has been sentenced to 50 years to life in prison.

McDaniel, who pleaded guilty to aggravated murder and aggravated robbery, apologized several times, speaking directly to Skernivitz’s widow and children, who sat in the jury box. He said he thinks about them and the family of Dingess every night before he goes to sleep.

OHIO DOCTOR ACQUITTED OF 14 PATIENT DEATHS SUES HEALTHCARE SYSTEM, SEEKS $20M

"You all may hate me. I understand that," he said. "I ruined three families that day. Nobody deserves to die."

But he insisted that he and the others didn't set out to kill anyone.

"I was still a kid," he said. "I’m not a bad person. I just made a bad decision."

CLICK HERE TO GET THE FOX NEWS APP

A second defendant, Kevin Robinson, who was 17 at the time of the shooting, pleaded guilty last summer and was sentenced to 28 years to life. Another defendant who was 15 at the time and did not fire any shots pleaded guilty in August 2021 to aggravated murder and was sentenced to a term in the state’s youth services facility.