Duane E. Buck barged into his girlfriend’s Texas home after she broke up with him and killed her and a friend. Later that morning in July 1995, he fired a rifle at his stepsister, who survived because the bullet just missed her heart.

His guilt was never in doubt, and Mr. Buck, 54, who is black, was sentenced to death by lethal injection. But concerns about testimony from a psychologist in the sentencing phase — that black people were more dangerous than white people — raised concerns about the role of race in the jury’s decision and led the case to reach the Supreme Court.

In February, the Supreme Court ordered a new sentencing trial for Mr. Buck, calling the psychologist’s testimony racist. In a Houston courtroom on Tuesday, Mr. Buck pleaded guilty to two counts of attempted murder, including the shooting of his stepsister, in a deal that exchanged the death penalty for a life sentence plus two 60-year terms.

“This case can accomplish something,” said Kim Ogg, the Harris County district attorney. “It can close a chapter in the history of our courts, in that they will never again hear that race is relevant to criminal justice or to the determination of whether a man will live or die. Race is not and never has been evidence.”