The majority justices on the US high court viewed the company's independent campaign expenditure as a significant factor in Benjamin's electoral success. They concluded the effort created a perception of a "probability of actual bias" when the company later appeared before Benjamin and the other justices.

"Just as no man is allowed to be a judge in his own cause, similar fears of bias can arise when – without the consent of the other parties – a man chooses the judge in his own cause," Justice Anthony Kennedy wrote in the majority opinion.

In a dissent, Chief Justice John Roberts warned that the decision unleashes an ill-defined standard upon America's judiciary, requiring judges to step aside whenever someone perceives a "probability of bias."

"This will inevitably lead to an increase in allegations that judges are biased, however groundless those charges may be," the chief justice said. "The end result will do far more to erode public confidence in judicial impartiality than an isolated failure to recuse in a particular case."

The case, Caperton v. Massey Coal Company, was being closely followed because it offered the justices the opportunity to address the issue of when judges must step aside and decline to hear a case because of potential or perceived conflicts of interest.

It arises at a time when many judicial elections in the United States are being swamped with millions of dollars in special-interest campaign money that some analysts say threatens to undercut public confidence in the judiciary.

The case is well known for another reason. It was the real-life inspiration for John Grisham's bestselling 2008 legal thriller, "The Appeal."

Under the federal judicial system and in some states, judges are appointed and serve for life. But in 39 states, judges must run for office and stand for election to retain their seat.

During such elections, judicial candidates can accept financial contributions from the public, including parties that might later appear before them as lawyers, plaintiffs, or defendants. In addition, sitting judges who have ruled in controversial cases may find themselves targeted by groups, companies, or individuals seeking their removal from the bench.

All those issues play a role in the Caperton case.

The litigation began amid a heated, long-running dispute between Hugh Caperton, a mining executive, and Don Blankenship, chairman and CEO of the Massey Coal Co.

Mr. Caperton says Mr. Blankenship drove his mining business into bankruptcy through questionable behind-the-scenes dealings. The dispute went to court, where a jury awarded Caperton $50 million for illegal contract interference and fraud.

Two years earlier, Blankenship spent $3 million to help unseat Warren McGraw, an incumbent justice on the West Virginia high court. Blankenship paid for a barrage of negative and exaggerated television ads accusing Justice McGraw of voting to release a child molester so he could work in a school.

McGraw lost the election. A West Virginia lawyer, Brent Benjamin, won the high-court seat and was sworn in as a justice in January 2005.

Then, in October 2006, Massey's appeal reached the West Virginia Supreme Court. Caperton asked Benjamin to step down from consideration of the case. He said there was an appearance of bias since the justice had been the beneficiary of Massey's $3 million campaign to unseat McGraw.

Lawyers for Massey filed a recusal motion of their own, seeking removal of a different justice they perceived as potentially hostile to their case.

Benjamin refused to step aside. Eventually, the West Virginia Supreme Court of Appeals voted 3 to 2 to invalidate the $50 million verdict against Massey. Benjamin voted in Massey's favor.

Caperton asked for a rehearing, repeating earlier calls for Benjamin's recusal. Two other justices stepped down from the case, but Benjamin remained on the bench. The state high court again voted 3 to 2 to throw out the $50 million verdict. Benjamin, again, voted in Massey's favor.

The issue before the Supreme Court was whether Benjamin was required under the Constitution's due process clause to step aside, or whether he acted properly in rejecting recusal motions and ultimately casting the deciding vote in the case.

Lawyers for Massey said Blankenship's $3 million was an independent expenditure rather than a campaign contribution to Benjamin. They said that Benjamin voted against Massey in five other cases, including a $243 million judgment against the company.

Justice Kennedy said in his opinion that the facts in the West Virginia case were extreme. He said the new constitutional standard announced by the court would come into play only rarely. "Most disputes over disqualification will be resolved without resort to the Constitution," he said.

Chief Justice Roberts disagreed. His dissent includes 40 questions raised by the majority ruling. Among them: "How much money is too much money?" and "Does the judge get to respond to the allegation that he is probably biased, or is his reputation solely in the hands of the parties to the case?"

Roberts continues: "Today's opinion requires state and federal judges simultaneously to act as political scientists (why did candidate X win the election?), economists (was the financial support disproportionate?), and psychologists (is there likely to be a debt of gratitude?)."

Kennedy said the majority justices did not question Benjamin's own subjective determination that he had acted properly and with fairness. But the Supreme Court was now applying an objective test.

"We conclude that there is a serious risk of actual bias – based on objective and reasonable perceptions – when a person with a personal stake in a particular case had a significant and disproportionate influence in placing the judge on the case by raising funds or directing the judge's election campaign when the case was pending or imminent," Kennedy wrote.

The inquiry, he said, must focus on the campaign contribution's size compared with the total spent in the election, and the apparent effect that the money had on the outcome of the election.

"Applying this principle," Kennedy said, "we conclude that Blankenship's campaign efforts had a significant and disproportionate influence in placing Justice Benjamin on the case."

In a separate dissent, Justice Antonin Scalia said the relevant question is whether the court does more good than harm by expanding a constitutional mandate for recusal "in a manner ungoverned by any [discernible] rule."