In Washington, heated judicial confirmation battles are nothing new. Sadly, partisan attacks on highly qualified nominees now seem to have infected state court nominations as well.

Earlier this month, the New Hampshire Executive Council rejected the nomination of state Attorney General Gordon MacDonald, Governor Chris Sununu’s pick for chief justice of the state Supreme Court.

Sununu nominated MacDonald from a list of finalists recommended by the governor’s nonpartisan Judicial Selection Commission. MacDonald’s nomination received unprecedented bipartisan support, including from 18 past presidents of the state bar association, three former New Hampshire chief justices, and Democratic and Republican members of the bar.

And with good reason.

MacDonald, who is widely regarded as a “lawyer’s lawyer,” is a former partner with Nixon Peabody. A graduate of Dartmouth College and Cornell Law School, MacDonald had a prestigious clerkship on the US Court of Appeals for the First Circuit (which covers New Hampshire). As state attorney general, MacDonald has received praise for his work on behalf of victims and for establishing the department’s first designated civil rights unit.

In presenting the nomination, Sununu noted that he and MacDonald don’t always see eye to eye, but the governor praised MacDonald for his independence and commitment to the rule of law — characteristics we should want in all of our judges.

Unfortunately, extremists, who view the courts (wrongly) as instruments of social change, opposed the nomination because — wait for it — MacDonald served as a 2016 delegate for the presidential campaign of Republican Senator Marco Rubio, who opposes abortion.

Activists also objected that, in the 1980s, MacDonald worked for former US senator Gordon Humphrey, who was known for introducing pro-life legislation. (Yes, MacDonald’s juvenile opponents had the gall to question the positions of MacDonald’s former boss more than 30 years ago, when MacDonald was barely out of college.)

Anyone who understands the proper role of the courts knows that MacDonald’s previous political activity is a nonissue. The role of a judge is not to engage in politics or to make policy, but to uphold the law. Of course, every judicial nominee holds personal political viewpoints; many have even been active in party politics. But, once confirmed, judges are supposed to rise above politics. (In the federal system, life tenure insulates judges from political pressures. In New Hampshire, appointment until age 70 provides similar protection.)

Shockingly, Democratic Executive Council members saw MacDonald’s commitment to the rule of law over politics as reason not to confirm him.

“MacDonald said he would follow the law of the land as if it were a protective talisman,” complained Democratic councilman Andru Volinsky.

Volinksy, it seems, doesn’t want an independent judiciary — he wants a politically liberal judiciary, willing to impose progressive policy objectives by judicial fiat.

This is, of course, a warped view of the judicial function that undermines our democratic system in favor of rule by unelected elites.

Perhaps recognizing the absurdity of imposing a political litmus test on MacDonald, activists switched gears. They claimed that the state attorney general and author of a three-volume treatise on New Hampshire legal practice was not qualified because he had no former judicial experience.

This attack was clearly pretextual. Judicial experience has never been a requirement for becoming a supreme court justice at either the state or federal level. Elena Kagan, who served as dean of the Harvard Law School and solicitor general of the United States, had no judicial experience before becoming an associate justice of the US Supreme Court. Neither did Earl Warren, who served as a state attorney general and governor of California before becoming chief justice.

The attack on Gordon MacDonald was purely political, and Sununu was right to condemn the Executive Council for allowing “Washington, D.C., circus theatrics” to sink the nomination.

New Hampshire activists may have won a political scalp. Sadly, it is the New Hampshire judiciary and the citizens of the Granite State who lose.