A 29-year-old man has been sentenced to life in prison for a 2016 murder committed during a robbery in north Minneapolis, Hennepin County Attorney Mike Freeman said Friday.

It took a jury less than two hours to convict Derrick Smith, of Minneapolis, of first-degree murder in the death of Richard Ambers, 31. Smith will be sentenced Jan. 17 to life with a chance of parole.

On the morning of Oct. 29, 2016, Ambers was found dead in the driver’s seat of his car, parked at 48th and Bryant avenues N., with two gunshot wounds to his head, according to the criminal complaint and testimony in an eight-day trial.

Earlier that morning, Ambers was at a nearby gas station with Smith, Ayan Wahab, 23, and Tyrel Patterson, 28, according to the county attorney’s office. Ambers was trying to sell marijuana.

Smith asked Wahab to buddy up with Ambers so they could rob him, the charges say.

Ambers and Wahab parked the car in the same spot where Ambers was later found. Wahab went into the home of Brandy Lee Jaques and spoke with Smith and Jaques about how to rob Ambers.

Wahab went back to the car and sat with Ambers until Patterson tapped on the car window, according to the charges.

Wahab left the car. Soon after, Wahab heard three gunshots, the complaint said.

Patterson’s trial on first-degree murder charges in the case is set to begin April 16. Wahab and Jaques have already pleaded guilty to aiding an offender, accomplice after the fact.

Smith, Patterson and Jaques also were charged in the Nov. 23, 2016, killing of drug dealer James Herron at his home in Prior Lake. Herron was killed as those three robbed him, police say. The trial in that case is expected to start in April.