Donald Trump accuses Supreme Court justices of bias in 1st direct attack as president As Supreme Court weighs Trump cases, the president openly criticizes justices.

President Donald Trump on Tuesday demanded that two sitting U.S. Supreme Court justices recuse themselves from all Trump-related matters, insisting without evidence that they have treated him unfairly.

“While ‘elections have consequences’, I only ask for fairness, especially when it comes to decisions made by the United States Supreme Court!” Trump said in a pair of tweets posted from Delhi, India, where he was completing a state visit 7,000 miles from Washington.

Trump singled out Justices Sonia Sotomayor and Ruth Bader Ginsburg – both appointed by Democratic presidents -- for comments he alleged reflect animus toward him. “Both should recuse themselves on all Trump, or Trump related, matters!” he said.

The tweets are the first time Trump has directly attacked members of the Supreme Court by name since taking office. Justices, who are appointed for life, decide on their own when it's appropriate to recuse from cases.

The criticism comes one month before the court will consider the legality of subpoenas for Trump’s financial records and as the justices weigh rulings on major Trump administration policies, including the cancellation of DACA. It also follows reports that Justice Clarence Thomas' wife Virginia has been closely advising the president and top aides on ensuring White House staff are loyal to Trump.

Supreme Court spokeswoman Kathy Arberg said the justices have no comment.

In his tweets, the president cites a Fox News report that claims Justice Sonia Sotomayor recently “accused GOP appointed justices of being biased in favor of Trump.”

“This is a terrible thing to say,” Trump said in his tweet. Sotomayor, in fact, has not leveled such a pointed accusation.

Legal experts said statements attributed to Sotomayor and others by Justice Ruth Ginsburg do not meet the recusal standard applied to all federal judges.

The extraordinary exchange stems from a narrow Supreme Court decision issued Feb. 21 lifting a lower court hold on the Trump administration’s new “public charge rule” for immigrants in the state of Illinois.

The court’s conservative majority offered no explanation for allowing the policy to take effect as legal challenges continue; Justice Sotomayor dissented in a seven-page statement.

"Perhaps most troublingly," she writes, "the Court’s recent behavior on stay applications has benefited one litigant over all others.”

While clearly passionate in her objection, Sotomayor never names Trump or the administration, instead referring to “the Government” as is customary.

“This Court often permits executions—where the risk of irreparable harm is the loss of life—to proceed, justifying many of those decisions on purported failures 'to raise any potentially meritorious claims in a timely manner,'” she writes in the dissent. “Yet the Court’s concerns over quick decisions wither when prodded by the Government in far less compelling circumstances.”

Sotomayor’s position is consistent with her long running and much publicized views that her colleagues often too quickly dismisses appeals from death row inmates and inconsistently address nationwide injunctions issued by lower courts.

She concludes, "I respectfully dissent."

The White House did not respond to questions about whether Trump had read Sotomayor’s opinion or only the Fox News characterization of it and why he believes Sotomayor was trying to “shame some into voting her way” as he alleged on Twitter.

The president also revived criticism of Justice Ginsburg who had referred to Trump as a “faker” during the 2016 campaign. She later apologized.

“She went wild during the campaign when I was running,” Trump said of Ginsburg during a press conference in India. “I don't know who she was for. Perhaps she was for Hillary Clinton, if you can believe it.”

None of the justices has publicly revealed his or her votes during the 2016 presidential election.

“The idea being advanced by President Trump - that a justice becomes conflicted if she disagrees with the executive branch’s legal strategy or constitutional theory - is not only wrong but also degrading to the independence of our judiciary,” said Gabe Roth, executive director of Fix the Court, a nonpartisan advocacy group.

“The notion that a dissent like Justice Sotomayor's could somehow be construed as an invalid attempt to shame other justices into coming to different conclusions would come as a surprise to many jurists throughout the country and throughout American history,” he said.

ABC News' Ben Gittleson contributed to this report.