President Donald Trump accused Supreme Court Justices Sonia Sotomayor and Ruth Bader Ginsburg on Tuesday of anti-Trump bias and said they should stay out of cases involving him.

Trump cited Sotomayor's scathing dissent last week in the court's decision to allow the administration to enforce its "public charge" immigration rule in Illinois.

Ginsburg called Trump a "faker" in 2016, while he was the presumptive Republican nominee for president, and later apologized.

"I just don't know how they cannot recuse themselves to anything having to do with Trump or Trump related," the president told reporters during a trip to India.

His comments come just weeks before the court will hear arguments in three cases concerning whether the president can shield his personal and business financial records, including his tax returns, from state prosecutors and Congress. Trump has bucked modern precedent by refusing to make his tax returns public.

Sotomayor's comments on Friday concerned the Trump administration's unusual practice of skipping federal appeals courts to bring cases directly in front of the justices.

In the case in question, Wolf v. Cook County, the administration was asking the court to remove a statewide block on a rule that would allow it to add new restrictions on those applying for green cards. The rule would make it more difficult for immigrants to obtain permanent citizenship if they have used or are likely to use public benefits like food stamps.

The top court removed a nationwide block on the rule in January by a 5-4 vote of the court's conservatives, and the same majority voted Friday to remove the Illinois block, just five days before the matter was to be considered by the 7th U.S. Circuit Court of Appeals.

Traditionally, the Supreme Court hears cases after they have worked their way through the lower courts, except in extraordinary circumstances. The Trump administration has routinely skipped the appellate stage when its policies have been blocked from going into effect.

"It is hard to say what is more troubling: that the Government would seek this extraordinary relief seemingly as a matter of course, or that the Court would grant it," Sotomayor wrote in her dissent.

Trump said in India that the statement was "inappropriate" and that Sotomayor was trying to "shame" her colleagues into voting with her.

"When you're a justice of the Supreme Court, it's almost what she's trying to do is take the people that do feel a different way and get them to vote the way that she would like them to vote," Trump said. "I just thought it was so inappropriate. Such a terrible statement for a Supreme Court justice."

The cases involving Trump's financial records will be argued March 31. Trump has asked the court to reverse three lower court rulings requiring his longtime accounting firm and two of his banks to turn over his financial records to investigators from the Manhattan district attorney's office and Democratic-led congressional committees.

Ginsburg and Sotomayor did not immediately respond to requests for comment submitted through the court.