AUSTIN — In an unexpected last-minute intervention, the U.S. Supreme Court on Thursday halted the execution of a black man after attorneys argued his race might have been a factor in sending him to death row.

Attorneys for Duane Edward Buck appealed to the high court after lower state and appeals courts had refused to stop the execution. Lawyers say Buck’s case was tainted by trial testimony from a psychologist who said he was more likely to commit a future crime because he was black.

Buck, 48, was convicted of the shooting deaths of his ex-girlfriend and another person in Houston in 1995. Two appeals, both related to the psychologist’s testimony, were before the court. One was granted.

Kate Black, an attorney for Buck, said he was “extremely excited” to hear the news.

Buck’s lawyers never contested his guilt but wanted officials to grant a stay so Buck could get a new sentencing hearing where race was not a consideration.

Perry, the front-runner for the GOP presidential nomination, had received a similar request for a reprieve from Buck’s lawyers but gave no response. Perry is a staunch adherent to the death penalty, overseeing more executions — 235 convicted killers in 11 years — than any other governor in recent times. As recently as this week, Perry said he’s never struggled with any of these executions.

With Perry out of state campaigning, his office sidestepped the issue by pointing out that Lt. Gov. David Dewhurst was technically left to decide whether to halt Buck’s execution. Previously, the governor’s office has said he remains in close contact with his office and Austin while traveling. Dewhurst’s spokesman declined to comment on the execution.

The Supreme Court decision came nearly two hours after 6 p.m., when Buck could have been executed.

Black said Buck’s reprieve will last long enough for the justices to determine how they want to rule on Buck’s appeal.

When Dr. Walter Quijano was called by Buck’s defense in his 1997 trial, he testified that Buck wouldn’t be dangerous in the future based on several factors, including his lack of a violent criminal record. But Quijano testified in response to a question from the state on cross-examination that blacks have an increased likelihood of future danger. The prosecution then urged jurors, who must decide whether the defendant will be a threat in the future, to rely on Quijano’s testimony to answer that question.

Then-Texas Attorney General John Cornyn determined that seven cases, including Buck’s, had been unconstitutionally tainted by Quijano’s racially charged testimony and required review. Buck is the only person who didn’t receive a new hearing. In the other cases, new punishment hearings were held and each convict again was sentenced to die.

“It is inappropriate to allow race to be considered as a factor in our criminal justice system,” Cornyn wrote in a 2000 statement. “The people of Texas want and deserve a system that affords the same fairness to everyone.”

Cornyn’s office declined to comment.

The Perry-appointed Texas Board of Pardons and Paroles denied Buck’s clemency request Wednesday, and the 5th U.S. Circuit Court of Appeals subsequently rejected his appeal. Attorney General Greg Abbott’s office would not comment, instead pointing back to a brief filed with the court of appeals arguing that Buck’s claims were meritless since Quijano was called to the stand by his defense.

But two other cases Cornyn identified for review called Quijano as a defense witness, too. And in 2000, a district court granted one of those defendants, Gustavo Garcia, a new hearing because “Quijano’s testimony… where he declares that race is a predictor of future dangerousness, was clearly unconstitutional.”

“We are relieved that the U.S. Supreme Court recognized the obvious injustice of allowing a defendant’s race to factor into sentencing decisions,” Black said. “No one should be put to death based on the color of his or her skin.”

The Associated Press contributed to this story.

The final call for a state reprieve fell to Lt. Gov. David Dewhurst because, under Texas’ constitution, the lieutenant governor takes on all the power and authority of the governor when the chief executive is outside of Texas. Gov. Rick Perry was in Iowa on Thursday, campaigning for president. Dewhurst, a Republican who has held the job since 2003, has never intervened in an execution.