It was appropriate that a trial over North Carolina’s new election maps unfolded around the anniversary of the Jan. 6 assault on the U.S. Capitol, for the issue before the three-judge panel was whether the court would prevent another assault on democracy.

The assault that took place in North Carolina’s capital wasn’t carried out by outsiders storming the legislative chambers. It was a quiet upending of fair elections executed by Republican members of North Carolina’s General Assembly as they drew and approved election maps designed to keep their party in power regardless of the popular will.

On Tuesday, the judges ruled unanimously that the local coup was OK. Now it will be up to the state Supreme Court to stand up for fair elections and restore democracy in North Carolina.

Cynics had predicted this ruling by simply looking at the affiliations of the judicial panel: Superior Court Judges Graham Shirley, Nathaniel Poovey and Dawn Layton — two Republicans and a Democrat. But more hopeful supporters of democracy hoped that partisanship would not blind the Republicans to election maps clearly drawn to give Republicans not only an unfair advantage, but in many districts an insurmountable one.

In the end, Layton joined her Republican colleagues, giving the ruling a false sense of unanimous approval. In fact, the judges were skeptical about the fairness of the maps, but deferred to the legality of the mapmaking process itself.

“This court neither condones the enacted maps nor their anticipated potential results,” the judges wrote. “Despite our disdain for having to deal with issues that potentially lead to results incompatible with democratic principles and subject our state to ridicule, this court must remind itself that these maps are the result of a democratic process.”

The plaintiffs, a group of voting rights advocates, presented expert after expert whose mathematical analysis of the Republican maps showed the maps to be distant outliers from what balanced maps would look like. The maps could produce outcomes as lopsided as a 10-4 or 11-3 Republican majority in the state’s congressional delegation and could restore Republicans to veto-proof majorities in the state House and Senate.

The court’s ruling was disappointing, but not unexpected, given the 2-1 Republican majority on the panel. Layton’s concurrence is regrettable because it strengthened the Republicans’ position in an appeal. But given the judges’ decision to rule on the process rather than the product, Layton’s vote is understandable.

The state Supreme Court should make fast work of this case by looking at how the maps disenfranchise voters based on their race or political views — two aspects the Republicans shamelessly contend they did not consider. Since Republicans assumed control of the General Assembly they have made North Carolina a national embarrassment on voting rights and fair elections. Multiple courts have found their election laws and district maps as unconstitutional efforts to deny certain voters their rights.

After a decade of that, North Carolina deserves to have elections conducted with fair maps.

In this case, in a dramatic way, the state Supreme Court is truly the court of last resort. If its seven justices stand for not only the letter, but the spirit of the law, they should be unanimous in overturning the lower court’s ruling. The Supreme Court should throw out the Republicans’ warped maps and lay out clear criteria for redrawing them in a way compatible with democratic principles.

Today’s editorial is from The Charlotte Observer. The views expressed are not necessarily those of this newspaper.