When South Dakota jurors were sentencing Charles Rhines, convicted of murder during a robbery, some reportedly thought life in prison would be enjoyable for him because he’s gay. Today, Rhines sits on death row, and this Thursday, the U.S. Supreme Court will consider whether to hear his argument that homophobia sent him there.

Rhines was convicted in 1993 of the previous year’s murder of Donnivan Schaeffer, a courier who walked into a Rapid City doughnut shop that Rhines was in the process of robbing, reports the Argus Leader, a South Dakota newspaper.. Rhines has avoided execution through a series of appeals, and he is now South Dakota’s longest-surviving death row inmate.

Rhines does not deny that he committed the murder, and he admits to being a sociopath. Schaeffer came into the office of Dig ’Em Donuts, where Rhines, a former employee of the shop, was going through a desk looking for money, according to the Argus Leader. Rhines stabbed him several times with a hunting knife; after Rhines had inflicted the first couple of wounds, Schaeffer begged to be taken to a hospital, but Rhines responded with sarcasm and then stabbed him in the neck and skull.

A jury quickly convicted Rhines, who had a criminal record. But when deciding whether to sentence him to death or to life in prison, jurors raised questions about his homosexuality, something Rhines’s lawyers discovered years later, reports The Marshall Project, a website focusing on criminal justice.

“There was lots of discussion of homosexuality,” one juror recalled in a court affidavit, the site reports. “There were lots of folks who were like, ‘Ew, I can’t believe that.’” Another said the jury thought Rhines “shouldn’t be able to spend his life with men in prison.” According to a third, a fellow juror said that sentencing Rhines to life in prison would amount to “sending him where he wants to go.”

As it is, Rhines has been in prison for more than 20 years, but in a segregation unit where he spends 23 hours a day in his cell, with one hour out for supervised exercise and recreation, the Argus Journal reports.

Now Rhines’s lawyers are asking the Supreme Court to consider whether antigay bias was a factor in his sentence and could possibly invalidate it. Usually the rule is that jurors’ remarks remain confidential, but the high court has made some exceptions in certain cases where it appeared racism motivated juries’ decisions, ordering that these cases be reconsidered. Looking at bias based on sexual orientation is “a natural next step,” Shawn Nolan, who supervises Rhines’s defense team at the Federal Community Defender Office in Philadelphia, told The Marshall Project.

“Tasking jurors with the decision whether to sentence an individual to death and, then, precluding evidence that jurors relied on anti-gay animus and stereotypes violates the right to impartial jury sentencing,” Rhines’s lawyers write in their brief to the Supreme Court.

The state of South Dakota is fighting against the team’s effort to have Rhines’s case reconsidered. In their brief to the Supreme Court, the state’s lawyers argue that jurors were reacting primarily to the brutality of Rhines’s crime in sentencing him to death, and they cast doubt on some jurors’ recollections of antigay remarks, The Marshall Project reports.

They also contend that sexual orientation isn’t comparable to race. “No politician has ever proposed constructing a wall to keep homosexuals out of the country,” the state’s brief says, according to The Marshall Project. “No civil war has been fought over [sexual orientation]. No nationwide pogrom has been perpetrated for the enslavement or eradication of homosexuals.”

Rhines’s lawyers have a different view. “Like race-based bias, anti-gay bias causes systemic harm to the justice system and, in particular, capital jury sentencing,” they write in their brief. “Prejudice based on sexual orientation is just as long-standing and deeply rooted.” They note that the high court referred to pervasive antigay prejudice in its marriage equality ruling, and they cite other cases as well. “To allow a juror to vote for a man’s death sentence on the basis of anti-gay animus and stereotypes unquestionably violates the Sixth and Fourteenth Amendments” to the U.S. Constitution, they add. The Sixth Amendment guarantees the right to a fair trial and the Fourteenth guarantees equal protection of the law.

The Supreme Court justices are scheduled to discuss Thursday whether to hear Rhines’s case. It is unknown when they will make a decision, but the list of cases the court has accepted and those it has rejected generally comes out on Mondays.