Three men charged in connection with a 2013 drug-related killing in Biddeford have pleaded guilty.

Bub Peter Nguany, 29, John Lopez, 22, and Mohamud Mohamed, 22, had been scheduled to stand trial next week in connection with the slaying of 47-year-old Charles Raybine of Biddeford, who was shot in the face multiple times while seated in a car parked outside an apartment complex.

Instead, each man elected to avoid trial and plead guilty this week. Nguany, who police believe was the gunman, pleaded to a charge of knowing or intentional murder. Lopez pleaded to a charge of felony murder, which means he had intent to commit a felony and it was reasonably foreseeable that a death would result. Mohamed pleaded guilty to a charge of conspiracy to commit murder.

Mohamed was sentenced this week to seven years in prison with all but three years suspended, followed by four years of probation.

Nguany and Lopez will be sentenced at a later date.

Raybine, according to witness statements, had a long history of drug abuse and had been using drugs and drinking on the night of March 25, 2013. At some point, he and a nephew, Morgan Palmer, went outside and sat in Raybine’s car, which was parked in a lot at Parish Place Apartments.

Sometime after midnight, two cars pulled into the parking lot. A man got out of the passenger seat of one of those cars and went to Raybine’s car. He asked Raybine who was with him and fired several shots at Raybine. Palmer, who was unharmed, ran away and called 911.

A Biddeford police detective recognized the description of the car, a rented black Toyota Prius, because he had stopped Nguany two days earlier driving it. He was charged at the time with illegal possession of a firearm.

When officers went to Nguany’s apartment in Old Orchard Beach shortly after the killing, they stopped him as he tried to leave in a taxi. A .45-caliber handgun, the same caliber as the one used to shoot Raybine, was found in Nguany’s backpack, along with two bags of crack cocaine.

Nguany was arrested and charged, but he refused to cooperate with police. The ongoing investigation, however, eventually led officials to Lopez, of Old Orchard Beach, and Mohamed, of Portland.

Lopez was arrested two years later and Mohamed turned himself in shortly after that. Part of the evidence linking the two men to Nguany were text messages that referred to getting a “heater,” slang for a gun.

Assistant Attorney General John Alsop declined to comment on the case until all three men have been sentenced, but he indicated Friday in court in Portland that the motive behind the killing appeared to be revenge for a previous robbery they thought Raybine committed.

Raybine had survived a 2003 shooting that grew out of a dispute over money.

Thomas Hallett, Mohamed’s attorney, said he was pleased with the outcome for his client given the seriousness of the charge.

Robert Ruffner, who represented Lopez, said his client faces a maximum of 15 years in prison under the plea agreement but he hopes a judge settles on a sentence closer to what Mohamed received.

“There was never any plan to kill anybody,” Ruffner said. “But my client recognizes his involvement in the series of events that led to this tragedy.”

Nguany’s attorney, Amy Fairfield, did not return a call for comment Friday.

Eric Russell can be contacted at 791-6344 or at:

[email protected]

Twitter: PPHEricRussell