In reactions mirroring the ideological split of the Supreme Court justices in their ruling Monday granting presidents immunity for official actions, Republicans expressed triumph and Democrats dismay.

Sen. JD Vance, R-Ohio, was the first of former President Donald Trump’s top running-mate contenders to weigh in, calling the decision “a massive win, not just for Trump but the rule of law.”

Other Republicans also praised the ruling as a rejection of what they characterized as Democrats’ using the government against Trump for political purposes.

Sen. Steve Daines of Montana, who leads the GOP Senate campaign arm, said the Supreme Court had ended a “sad chapter of Joe Biden’s weaponization of the Justice Department.” Stephen Miller, a top Trump adviser, called the decision “another setback for the Democrat Party’s illegal and unconstitutional crusade to outlaw dissent, jail the opposition leader, impose authoritarian rule, replace democracy with the deep state and liberty with left wing oligarchy.”

The Justice Department operates independently of the president, and there is no evidence that President Joe Biden has had any involvement in its prosecution decisions.

Trump wants to eliminate the department’s independence and has called for prosecuting his political opponents, purging federal agencies of civil servants who might oppose his policies and greatly expanding executive power.

Democrats expressed fear for the future of American democracy, as Justices Sonia Sotomayor, Elena Kagan and Ketanji Brown Jackson did in their dissenting opinion. “Simply frightening. May God have mercy on this nation,” Jaime Harrison, chair of the Democratic National Committee, wrote alongside Sotomayor’s quote: “With fear for our democracy, I dissent.”

Biden’s deputy campaign manager, Quentin Fulks, said on a call with reporters that the Supreme Court had “handed Donald Trump the keys to a dictatorship.” Shortly before that, the campaign put out a statement that the ruling did not change the facts of Trump’s actions leading up to and on Jan. 6, 2021: “Donald Trump snapped after he lost the 2020 election and encouraged a mob to overthrow the results of a free and fair election.”

“Our democracy has been gravely wounded,” Eric Holder, who served as attorney general for President Barack Obama, wrote in a post on social media, saying the Supreme Court had given presidents free rein to commit crimes. “There is no basis in the Constitution for this Court constructed monstrosity.”

Rep. Alexandria Ocasio-Cortez, D-N.Y., said the Supreme Court had been “consumed by a corruption crisis” and pledged to file articles of impeachment, although she did not specify against which justices. Justices Samuel Alito and Clarence Thomas have been under scrutiny because a flag associated with the “Stop the Steal” movement flew outside Alito’s house after the 2020 election, and Thomas’ wife was involved with efforts to overturn the election.

Supreme Court justices can be impeached, but only one has been — more than 200 years ago — and Republicans currently control the House.

New York Sen. Chuck Schumer, the Democratic leader, called Monday “a sad day for America. Treason or incitement of an insurrection should not be considered a core constitutional power afforded to a president.”

U.S. District Court Judge Tanya Chutkan, who is overseeing Trump’s trial in Washington, will have to determine whether his specific actions are protected under the ruling. That will take time and very likely delay a trial past the election — at which point, if Trump wins, he could order the Justice Department to end the case.

Outside groups focused on democracy also condemned the ruling.

“The Court has issued an instruction manual for lawbreaking presidents,” said Michael Waldman, president of the Brennan Center for Justice at New York University. “Make sure you conspire only with other government employees. You’ll never be held to account.”

Before the Supreme Court got involved, a trial judge and a three-judge appellate panel had ruled unanimously that Trump could be prosecuted for actions undertaken while in the White House and in the run-up to Jan. 6.

“For the purpose of this criminal case, former President Trump has become citizen Trump, with all of the defenses of any other criminal defendant,” the appeals court wrote in February.

Chutkan ruled against Trump’s immunity claim in December, saying the office of the president “does not confer a lifelong ‘get-out- of-jail-free’ pass.”