Attorney Teresa Toriseva, left, presents arguments before the West Virginia Supreme Court of Appeals on Sept. 24 at the West Virginia State Capital in Charleston,W.Va. (Kenny Kemp/AP)

Patrick McGinley is the Charles H. Haden II Professor of Law at West Virginia University. David Lyle is senior counsel and director of the state courts project at the American Constitution Society.

President Trump may have huffed and puffed about “so-called” judges, but — at least so far — he has been all tweets and no action. Republican politicians at the state level, on the other hand, have had more courage, attempting in multiple states to impose their will on their supreme courts.

This is a dangerous moment for our country. Attacks on judges and courts pose a real and ongoing threat to judicial independence and the rule of law.

Take, for example, Pennsylvania, where a dozen Republicans in the state legislature threatened in March to impeach four of the state Supreme Court’s five Democratic justices after the court rejected a gerrymandered congressional map and redrew the lines in a manner less favorable to the GOP. The legislators backed down in the face of widespread criticism, including from the court’s chief justice.

Or consider West Virginia, where the House of Delegates impeached four of the five members of the state Supreme Court of Appeals this summer on charges including failing to carry out their administrative duties and misusing state money to renovate their offices. (A fifth justice had already resigned from the court and pleaded guilty to a federal wire-fraud charge.) Far from trying to restore trust in the court after a serious scandal, however, House Republicans in the state attempted to time their impeachments in such a way that Gov. Jim Justice, a Republican, might have been able to fill court vacancies with loyalists without subjecting them to elections until 2020, as per state law.

The impeachment proceedings were thrown into disarray last month, however, when a five-judge panel serving as a temporary supreme court blocked the trial of Chief Justice Margaret Workman, a Democrat, ruling that her impeachment and trial process was unconstitutional. This halted the Republican effort to remove Democrats on the court for the time being, but not without rankling partisans in the legislature. One Republican senator was so eager to continue with the impeachment of Workman that he urged forcing the acting chief justice to the Senate chambers to preside over the trial.

The episode, however, will likely end up being at least a partial victory for Republicans, as the governor was able to put two Republicans on the bench, both former lawmakers who will be running on the November ballot as incumbents — a serious electoral advantage.

Meanwhile in Florida, Gov. Rick Scott, a term-limited Republican, came up with an audacious plan to reshape his state’s Supreme Court. On Jan. 8, 2019, the terms of three progressive justices on the Supreme Court will come to an end — the same day that the next Florida governor would be sworn in at noon. Scott, rather than hand off these appointments to his successor, claimed he has the power to appoint the new justices in the waning minutes of his term, tilting the court sharply to the right for a generation. Fortunately for voters, the Florida Supreme Court disagreed, ruling in October that the winner of November’s election — not Scott — was legally empowered to appoint the new justices. Unfortunately, though, Scott has packed the commission that recommends the judges the new governor will choose from — so he may still get his preferred appointees.

And don’t forget North Carolina, where a years-long effort by conservative state legislators to impose their will on the state’s courts is building to a crescendo with a proposed constitutional amendment shifting power to appoint judges from the governor to the legislature. Previous power grabs by the Republican legislative majority included terminating the state’s popular system of public financing of judicial elections, a shift from nonpartisan to partisan judicial elections (the first state to do so in about 100 years) and plans to alter the number of judges on state appellate courts to game out an ideological advantage.

In each of these states, coalitions of government reform groups, bar associations and concerned citizens have joined together to defend judicial independence and the rule of law. They emphasize the courts’ crucial role in our constitutional system of checks and balances — as an independent judiciary — checking excesses of the legislative and executive branches.

But they shouldn’t have to stand up for our constitutional principles alone. Efforts to support constitutional governance are most effective when legislative leaders reject political partisanship to speak up for the courts. In Pennsylvania, for example, Republican state House Majority Leader Dave Reed reminded members of his party that “disagreement over the outcome of any particular case should not be grounds for impeachment.” And in West Virginia, Republican Senate Judiciary Committee Chairman Charles Trump responsibly acknowledged that “the Supreme Court is the final arbiter of what is or is not constitutional . . . As to those questions, that’s it.”

For more than two centuries, state constitutions have guaranteed judicial independence as a cornerstone of American democracy. State legislators need to recognize that courts have a job to do. We the people should insist that politicians let them do it.