He killed someone in 2005. Last year he tried to rob a man who was shot in Lakewood.

A man has been sentenced for an attempted robbery at a Lakewood motel during which the victim was shot.

Superior Court Judge Frank Cuthbertson sentenced 30-year-old Willie James Carter on Thursday to seven years, nine months in prison — after Carter pleaded guilty to attempted first-degree robbery and unlawful gun possession.

Carter was not allowed to have a gun at the time of the attempted robbery, which happened last year.

That’s because he has prior convictions, such as for fatally shooting a man in 2005 during a drug deal in New Orleans. He pleaded guilty to manslaughter as part of negotiations with prosecutors in that case, and Louisiana court records show he was sentenced to five years in prison.

Court records give this account of what happened in the Lakewood incident:

The victim was lured to a room at the motel July 20, 2016, in the 9900 block of South Tacoma Way. Carter then pointed at gun at the man and demanded his necklace. The victim charged Carter, and the two struggled.

Another man accused in the attempted robbery, Alexander Xavier Sharp, joined the fight.

An acquaintance of both Carter and Sharp, Willie Lee Joyner V, then grabbed a gun and shot the victim in the back.

The victim also was armed and fired as the others fled. He survived his injuries.

Joyner, 27, was sentenced to seven and a half years in prison in March, after he pleaded guilty to attempted first-degree assault.

Sharp, 29, got four years and a couple months behind bars in May, after he pleaded guilty to attempted first-degree robbery. He maintained his innocence but agreed to a plea deal because he believed he’d likely be convicted at trial.

Alexis Krell: 253-597-8268, @amkrell