NEW YORK — A New York City street gang member was sentenced to death on Wednesday in the execution-style slayings of two undercover police officers in 2003 — the latest chapter in a case that's seen his original death sentence overturned, his behind-bars affair with a prison guard exposed and the massive cost of his defense questioned.

It took a jury only about five hours to reach the decision in federal court in Brooklyn in the case against Ronell Wilson.

Wilson, 31, leaned forward on the defense table with his hands clasped as the sentence was announced in court, but showed no emotion. Several of his family members could be heard weeping in the gallery.

On a verdict form, the 12 jurors indicated that only two believed Wilson's contention that he didn't know his victims were police officers. There also were only two who agreed that the defendant could be spared because his life "has value," but ultimately joined in the unanimous decision on his sentence.

Outside court, the widow of one of the officers was in tears as police union officials praised the outcome. She declined to speak to reporters.

"Today, a jury of his peers looked at Ronell Wilson, everything he did and all that he is, and rendered justice," U.S. Attorney Loretta Lynch said in a statement.

Another jury had found Wilson guilty in the point-blank shootings of undercover officers James Nemorin and Rodney Andrews. The gunman shot both men in the head after one pleaded for his life.

The first jury also sentenced Wilson in 2007 to die by lethal injection, making him the first federal defendant to receive a death sentence in New York City since the 1950s. But an appeals court threw out the sentence in 2010 because of an error in jury instructions and prosecutors chose to repeat the penalty phase rather than let Wilson serve an automatic life term without parole.

U.S. District Judge Nicholas Garaufis questioned the decision, saying that it put taxpayers on course to spend millions of dollars more on Wilson's defense. He noted that he had just presided over a capital case for a mobster where the defense bill was $5 million and the jury chose to impose a life sentence.

Officials revealed in February that, after being transferred from federal death row in Indiana to a Brooklyn lockup to await the proceedings, Wilson fathered a child with a jail guard. She's since pleaded guilty to an illegal sex act.

The new set of jurors, though not deciding Wilson's guilt, once again heard about how the victims were posing as illegal gun buyers. The pair met with Wilson — known then by the nickname "Rated R" for what they thought was a deal to buy a Tec-9 submachine gun. But Wilson decided to rob them instead and ended up shooting them.

Prosecutors cited a scrap of paper Wilson was carrying when he was arrested as proof he was a cold-blooded killer. It had the rap lyrics saying that if he was ever crossed, he would put "45 slogs in da back of ya head" and "ain't goin stop to Im dead."

The government also argued that Wilson's conduct behind bars, including having sex with the jail guard and threatening a gay inmate, made him a bad candidate for a life term.

In asking to spare his life, Wilson "wants you to use your humanity," said Assistant U.S. Attorney Celia Cohen said in closing arguments. "He has shown through his actions that he has absolutely no humanity."

The defense conceded Wilson had committed a horrible crime. Wilson's lawyers instead sought to focus jurors on his background as the product of a crack-addicted mother living with a dozen relatives crammed into an apartment at a crime-infested housing project.

Defense attorney David Stern argued that a life sentence was sufficient punishment for a "limited" and "impulsive" defendant who was never taught right from wrong.

"One day he'll die wearing the same khaki clothes he's worn for 20 or 30 or 40 years," Stern said. "Very few people will know or care."

Copyright 2013 The Associated Press

Copyright 2015 Associated Press. All rights reserved. This material may not be published, broadcast, rewritten, or redistributed.