A North Carolina court ruled Tuesday that the state’s legislative districts are unconstitutional, in a unanimous decision that won praise from voting-rights advocates and opens a new front in the national battle over partisan gerrymanders.

The three superior court judges in Wake County set a deadline of Sept. 17 by which North Carolina’s Republican-led General Assembly must submit redrawn state House and Senate district maps to be reviewed by a court-appointed referee.

In their ruling, the judges stated that the plaintiffs had proved the effect of the “partisan” maps drawn by the state legislature was that, “in all but the most unusual election scenarios, the Republican party will control a majority of both chambers of the General Assembly.”

“In other words, the Court finds that in many election environments, it is the carefully crafted maps, and not the will of the voters, that dictate the election outcomes in a significant number of legislative districts and, ultimately, the majority control of the General Assembly,” the judges said in their ruling.

North Carolina Senate Leader Phil Berger (R) blasted the decision, which he argued “contradicts the Constitution and binding legal precedent,” but said that the General Assembly does not plan to appeal it.

“Nearly a decade of relentless litigation has strained the legitimacy of this state’s institutions, and the relationship between its leaders, to the breaking point,” he said in a statement, according to Charlotte-based station WBTV. “It’s time to move on. To end this matter once and for all, we will follow the court’s instruction and move forward with adoption of a nonpartisan map.”

Common Cause, the nonprofit government watchdog group that filed the lawsuit, called Tuesday’s ruling “a historic victory for the people of North Carolina.”

“The court has made clear that partisan gerrymandering violates our state’s constitution and is unacceptable,” Bob Phillips, executive director of Common Cause North Carolina, said in a statement. “Thanks to the court’s landmark decision, politicians in Raleigh will no longer be able to rig our elections through partisan gerrymandering.”

State Democrats hailed the news as well.

“Folks I’ve been in the NC legislature for about five years and this is the single best news I have ever heard,” North Carolina state Sen. Jeff Jackson (D) said in a tweet soon after the judges announced their ruling.

Republicans control both chambers of North Carolina’s bicameral General Assembly. The state Senate has 50 seats, with 29 held by Republicans and 21 held by Democrats. In the state House, Republicans control 64 seats, while Democrats hold 55 seats, and one remains vacant.

The Supreme Court, considering partisan gerrymanders of congressional districts in North Carolina and Maryland this summer, ruled 5 to 4 that policing such gerrymanders is not the province of federal courts.

“We have no commission to allocate political power and influence in the absence of a constitutional directive or legal standards to guide us in the exercise of such authority,” wrote Chief Justice John G. Roberts Jr. in a decision that split along ideological lines.

But he noted that those opposed to partisan gerrymandering had other options, such as trying to create independent commissions to draw electoral lines, or to challenge maps in state courts under provisions in state constitutions.

“Our conclusion does not condone excessive partisan gerrymandering. Nor does our conclusion condemn complaints about districting to echo into a void,” Roberts wrote, adding that “provisions in state statutes and state constitutions can provide standards and guidance for state courts to apply.”

The Florida Supreme Court ordered redrawing some districts in that state because of a “fair districts” amendment to that state’s Constitution, and the Pennsylvania Supreme Court ordered a new congressional map because it said partisan concerns resulted in districts there that overwhelmingly favored Republican candidates in a state that usually is a toss-up.

The North Carolina court found its power to order new districts in a provision “originally enacted in 1776 and contained in the ‘Declaration of Rights’ of our Constitution, [which] simply states that ‘[a]ll elections shall be free.’ ”

The court concluded that “the Free Elections Clause of the North Carolina Constitution guarantees that all elections must be conducted freely and honestly to ascertain, fairly and truthfully, the will of the People and that this is a fundamental right of North Carolina citizens, a compelling governmental interest, and a cornerstone of our democratic form of government.”

Richard Hasen, a professor specializing in election law at the University of California at Irvine, said Tuesday’s decision is an example of a state court effectively using the state constitution to set “some meaningful limits” on self-interested legislators seeking to preserve their own political power.

“After the Supreme Court decided the Rucho case [in June], taking federal courts out of the business of drawing districts, the question was whether there would be anything that would put the brakes on even more partisan gerrymanders in the future,” Hasen said.

If Republicans had decided to appeal, there is a good chance Tuesday’s ruling would stand, given that Democrats control North Carolina’s Supreme Court, Hasen said. But the landscape looks different elsewhere in the country. In Wisconsin, for instance, where Republicans engaged in “serious gerrymandering” of legislative maps, the state Supreme Court is controlled by the GOP, Hasen noted.

“It’s going to be a state-by-state slog,” he said.