A 21-year-old pimp was sentenced to seven years in state prison Thursday for killing a San Rafael man he thought was someone else.

Michael Marshawn Powell Jr., a Pinole resident, pleaded guilty to voluntary manslaughter with a firearm in the 2009 death of Donald Espinoza Ordonez. He also admitted to pimping a child younger than 16.

Powell was formally sentenced by Judge Andrew Sweet, but the prison time had already been determined in negotiations. Prosecutor Geoff Iida said the plea offer was influenced by numerous factors, including: sparing the victim's family the ordeal of testifying about his death; protecting juvenile witnesses against risk of retaliation if they testified; and the uncertainties of trying a case before a jury.

"Additionally, the defendant now has a strike conviction on his record under the Three Strikes Law, and he will have to register as a sex offender for the rest of his life," Iida said. "Furthermore, the defendant is awaiting federal charges in Arizona for drug-related activity and likely will be transferred to that jurisdiction shortly. ... On balance, we strongly believe the agreed disposition in this case was fair and appropriate."

Charges were dismissed against a codefendant, Nickie Allen Donald Jr., 21, of Richmond. His lawyer, Michael Marowitz, said the evidence was weak.

Donald is still facing a murder trial in an unrelated case in Contra Costa County.

Espinoza, 22, was gunned down while hanging Christmas decorations outside his new apartment on Larkspur Street, police said. Espinoza, a volunteer at the Canal Alliance, had moved into the apartment earlier that day.

On the night of the shooting, police said, Powell was running teenage prostitutes in the area and got into an unrelated argument with two people outside Espinoza's apartment. Powell allegedly went home, got a gun and came back with Nickie Donald to hunt down the person he was arguing with.

Espinoza was shot after Powell misidentified him as the person from the argument, police said.

Contact Gary Klien via email at gklien@marinij.com