WASHINGTON - When he was Philadelphia's district attorney, Ronald D. Castille signed off on a decision that would land Terrance Williams on death row for the 1984 beating death of a Germantown church deacon.

Now, a role that Castille later played in the case as chief justice of the Pennsylvania Supreme Court could prove key in efforts to fend off Williams' execution.

The U.S. Supreme Court heard arguments Monday on whether Castille, the prosecutor who approved pursuing the death penalty against Williams, should have recused himself when the case came before the state's top court for appeal.

The question could lead to a decisive ruling on judicial ethics, and has put the decision-making of one of the most influential recent figures in Pennsylvania's criminal justice system under a national spotlight.

"What does it mean to be a prosecutor if you're not taking responsibility personally . . . for the decision to execute someone?" Justice Sonia Sotomayor asked. "At what point do we give meaning to the constitutional command that you can't be prosecutor and judge?"

Before the high court, lawyers for the Philadelphia District Attorney's Office argued that Castille, as a prosecutor, played only a minimal supervisory role in Williams' case.

But Williams' lawyer Stuart B. Lev said Castille's dual position posed a clear conflict of interest, and urged the Supreme Court to grant his client a new appellate hearing.

The justices, however, seemed focused not just on Williams' case, but more broadly on what circumstances should prompt a judge to recuse. Their questioning also attempted to draw out just how much sway Castille's voice held over the other justices on the state's high court when they unanimously affirmed Williams' death sentence in 2014.

Castille - a decorated Vietnam veteran and career prosecutor who ran for mayor before winning his Supreme Court seat - has repeatedly defended his decision. He retired from the court in 2014.

"What was I supposed to do?" he asked last year. "Recuse myself from every case that came out of the Philadelphia District Attorney's Office? That's ridiculous."

The justices' decision, expected by summer, is likely to reverberate through Pennsylvania's hotly contested political debate over Gov. Wolf's moratorium on the death penalty, a punishment he described last year as "ineffective, unjust, and expensive" while citing Williams' case.

Critics of Wolf's decision consider Williams, a two-time murderer with a history of other violent crimes, a worthy candidate for execution.

Williams, 49, was an 18-year-old Cheyney University football standout when he was arrested in 1984 and charged with murdering Amos Norwood. At the time, city prosecutors alleged that during a robbery, he bludgeoned Norwood to death in a West Oak Lane cemetery, then set his corpse on fire.

Though Williams maintained throughout his trial that he was innocent and had never met Norwood, he has since claimed that the killing was motivated by five years of sexual abuse he says he suffered at Norwood's hand as a teenager.

The case before the Supreme Court on Monday centered on a 2014 hearing in which Pennsylvania's Supreme Court justices affirmed Williams' death sentence, despite a lower court's finding that prosecutors had withheld evidence that might have aided in his defense.

Just five days before Williams was set to be executed in 2012, Common Pleas Court Judge M. Teresa Sarmina threw out his sentence, saying prosecutors under Castille had failed to share - among other evidence - information that Norwood had sexually abused other teenagers he had met through his church.

But in a unanimous decision in 2014, Castille and the other Supreme Court justices rejected her ruling, finding that Williams could have raised his alleged sexual past with Norwood at his original trial, but instead had lied under oath when he testified that he had never met the man.

Castille, in an opinion laced with withering criticism, suggested that Sarmina's court had become "unmoored from its lawful duty," and accused Williams' appeals team of sidestepping procedural rules and "pursuing an obstructionist anti-death-penalty agenda."

Williams' lawyers sought Castille's recusal before that decision, but the chief justice refused.

Ronald Eisenberg, chief of appeals for the District Attorney's Office, defended that decision Monday, noting that Williams' case was just one of more than 2,000 murder cases Castille oversaw as Philadelphia's top prosecutor.

"Judges are human beings - they have prior lives," he said. "We don't want to have a situation where the only people who can become judges and sit on cases are people with no prior experiences."

But Justice Anthony M. Kennedy, often a key swing vote in close court decisions, balked when Eisenberg noted that three decades had elapsed between Castille signing off on Williams' death penalty prosecution and the case coming up again before Castille's court.

"So," Kennedy asked, "the fact that he spent 30 years in solitary confinement actually helps the state?"

Some on the left-leaning wing of the court, like Sotomayor, appeared skeptical that Castille could have heard the case without bias, given his role as a prosecutor who later ran for his judicial post with ads boasting that he had sent 45 people to death row.

But the conservative wing of the court, most pointedly Justice Samuel A. Alito Jr., worried that any sweeping ruling he and his colleagues might make on the case could lead to unintended ramifications such as requiring all prosecutors-turned-judges to step aside from cases for any prior involvement, no matter how small.

"Anything other than that seems to me to be pretty fuzzy," Alito said. "But that would be a pretty far-reaching rule."

jroebuck@phillynews.com

215-854-2608 @jeremyrroebuck