Last week, Supreme Court Justice Sonia Sotomayor wrote a scathing dissent against her fellow justices, criticizing them for acting too quickly to grant the Trump administration’s requests in the onslaught of litigation coming from liberal activist groups. President Donald Trump responded by calling on her and Justice Ruth Bader Ginsburg to recuse themselves from cases involving the Trump administration.

He quoted Laura Ingraham, saying, “Sotomayor accuses GOP appointed Justices of being biased in favor of Trump.”

“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’. Both should recuse themselves on all Trump, or Trump related, matters!” the president tweeted. “While ‘elections have consequences’, I only ask for fairness, especially when it comes to decisions made by the United States Supreme Court!”

“Sotomayor accuses GOP appointed Justices of being biased in favor of Trump.” @IngrahamAngle @FoxNews 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”. Both should recuse themselves.. — Donald J. Trump (@realDonaldTrump) February 25, 2020

During remarks at a press conference in India early Tuesday morning, the president explained why he took this stance. “I just thought it was so inappropriate, such a terrible statement for a Supreme Court justice,” he said. “She’s trying to shame people with perhaps a different view into voting her way, and that’s so inappropriate.”

Sotomayor criticized her fellow justices in a dissent to a Supreme Court ruling granting a stay from an injunction against a Trump administration policy. She condemned what she saw as a pattern among the Trump administration and her fellow justices.

“Claiming one emergency after another, the Government has recently sought stays in an unprecedented number of cases, demanding immediate attention and consuming limited Court resources in each. And with each successive application, of course, its cries of urgency ring increasingly hollow,” she wrote. “… this Court is partly to blame for the breakdown in the appellate process. That is because the Court—in this case, the New York cases, and many others—has been all too quick to grant the Government’s ‘reflexiv[e]’ requests. Ibid. But make no mistake: Such a shift in the Court’s own behavior comes at a cost.”

Yet the Supreme Court’s actions in granting stays to the Trump administration do not come from a vacuum. The administration has faced an unprecedented onslaught of lawsuits from liberal groups resulting in nationwide injunctions from various courts.

Last month, Justice Neil Gorsuch condemned the frequent practice of lower courts granting injunctions against Trump administration policies — effectively vetoing the executive branch’s attempts to do its job.

“The real problem here is the increasingly common practice of trial courts ordering relief that transcends the cases before them. Whether framed as injunctions of ‘nationwide,’ ‘universal,’ or ‘cosmic’ scope, these orders share the same basic flaw—they direct how the defendant must act toward persons who are not parties to the case,” Gorsuch wrote.

“Despite the fluid state of things—some interim wins for the government over here, some preliminary relief for plaintiffs over there—we now have an injunction to rule them all: the one before us, in which a single judge in New York enjoined the government from applying the new definition to anyone, without regard to geography or participation in this or any other lawsuit,” he added, citing a specific injunction. “The Second Circuit declined to stay this particular universal injunction, and so now, after so many trips up and down and around the judicial map, the government brings its well-rehearsed arguments here.”

“It has become increasingly apparent that this Court must, at some point, confront these important objections to this increasingly widespread practice. As the brief and furious history of the regulation before us illustrates, the routine issuance of universal injunctions is patently unworkable, sowing chaos for litigants, the government, courts, and all those affected by these conflicting decisions,” Gorsuch wrote.

Trump went too far in calling for Ginsburg and Sotomayor to recuse themselves from cases, but he was right to push back against Sotomayor’s deceptive rhetoric on this issue. The Supreme Court is defending the Trump administration more frequently because so many lower court judges are issuing injunctions that prevent the executive branch from doing its job.

I would prefer that Congress made the crucial decisions of legislating, rather than leaving it up to administrative agencies and the president to oversee. Yet under our current system, the work of administrative agencies rightly falls under the president’s purview, and it is not the courts’ job to fight his policies.

Tyler O’Neil is the author of Making Hate Pay: The Corruption of the Southern Poverty Law Center. Follow him on Twitter at @Tyler2ONeil.