A Petaluma man awaiting trial in a marijuana rip-off slaying pleaded guilty Thursday to first-degree murder in a deal that will allow him a chance at parole.

Fernando Lopez-Castillo, 27, admitted being the shooter in the 2011 killing of Jose Manual DeJesus during the robbery of 20 pounds of pot outside Carniceria Contreras on Todd Road in Santa Rosa.

He could have received life in prison without parole if he had been convicted at trial but instead will be sentenced to 50 years to life.

His lawyer, Erik Bruce, said he will be eligible for parole in about 46 years. His sentencing is Sept. 16.

The plea bargain was reached as both sides were selecting a jury.

Lopez-Castillo is the last of four defendants to be convicted in the case. Jose Caraballo-Mejias and Alberto Lopez-Barraza were convicted by a jury of first-degree murder and received life without parole.

Lopez-Castillo's brother, Ramon Lopez-Castillo, admitted his role and was sentenced to 25 years to life.