A Chester County man who shot a father of two and left him to die during a carjacking in 2018 has been convicted of murder, prosecutors said Friday.

Hakeem Smith, 33, of Oxford, was found guilty late Thursday of second-degree murder, robbery, and related offenses in the death of Sam Algarin, 31, after a four-day trial in West Chester. His sentence was deferred to a later date by Chester County Court Judge Patrick Carmody.

In Pennsylvania, second-degree murder denotes a killing that was committed in the process of another felony, in this case the robbery.

Smith’s attorney, Brian McCarthy, said he was pleased that the jury acquitted Smith of the more serious first-degree murder charge, but declined to comment at length “out of respect for the family and for the judicial process.”

Chester County District Attorney Deborah Ryan called Algarin’s death one of the most tragic and senseless murders she had handled as a prosecutor.

» READ MORE: Arrest made in carjack killing of father of two in Chester County

“[Smith’s] greed, heartlessness, and brutality destroyed the lives of those Mr. Algarin loved most — his sons, mother, & family,” Ryan said in a statement. “Hopefully, this verdict brings a measure of peace to Mr. Algarin’s family and friends that justice was done and Hakeem Smith will be punished for the death of their loved one.”

Investigators said that Smith had just been kicked out of his mother’s house and was desperate for money and a vehicle when he encountered Algarin in Oxford in September 2018.

Algarin, of Quarryville, Lancaster County, had just left his mother and two sons after meeting them at a pizzeria and returned to his SUV in a Starbucks parking lot, police said.

As Algarin drove on Route 10 in Oxford, he saw Smith, who flagged him down, and at some point shot him once in the chest and stole the vehicle, according to investigators. He later dumped Algarin’s body on the side of the rode a few miles away.

Surveillance footage at a nearby gas station showed Smith driving the SUV, and his handprint was found on the vehicle’s window when it was eventually recovered, having been abandoned in Westtown Township.

Algarin’s cousin, Edwin, said Friday that his family was grateful for the work done by the District Attorney’s Office in the case, as well as the outpouring of support from people in Chester County.

“The community was amazing,” he said. “The past three years have been very rough and we’re just grateful for everyone’s words and prayers.”