President Trump tweeted during his India visit late Monday that Supreme Court Justices Sonia Sotomayor and Ruth Bader Ginsburg should "recuse themselves" from cases involving him or his administration.

Why it matters: The president's criticism of the liberal justices comes after he attacked the judge overseeing the case of his longtime adviser Roger Stone, who was sentenced last Thursday to 4o months in prison for crimes including lying to Congress and witness tampering.

Attorney General Bill Barr told ABC News in an interview this month that Trump's "constant background commentary" about the Justice Department and its cases make it "impossible" for him to do his job."

What they're saying: Trump posted the tweet in an apparent reference to Sotomayor's dissenting opinion Friday in a case enabling his administration's "public charge" immigration rule to go into effect in which she said the court "has been all too quick" to grant the government's requests, but "make no mistake: Such a shift in the Court’s own behavior comes at a cost."

"Sotomayor accuses GOP appointed Justices of being biased in favor of Trump,'" the president tweeted, citing Fox News' Laura Ingraham.

"This is a terrible thing to say. Trying to 'shame' some into voting her way? She never criticized Justice Ginsberg when she called me a 'faker,'" he continued. "Both should recuse themselves on all Trump, or Trump related, matters! While 'elections have consequences,' I only ask for fairness, especially when it comes to decisions made by the United States Supreme Court!"

Flashback: Ginsburg called Trump a "faker" when he was the Republican presidential nominee in 2016 and told the New York Times at the time she couldn't imagine him as president, prompting him to tell the Times the justice was a "disgrace." She later apologized for her remarks that year.

Go deeper: Trump congratulates Barr after prosecutors resign from Roger Stone case