RALEIGH, N.C. (AP) – North Carolina’s highest court on Wednesday delayed the state’s planned March 8 primary until May while state courts review claims of illegal gerrymandering.

The decision by the state Supreme Court comes after a state Court of Appeals panel initially blocked filing for legislative and congressional candidates on Monday, only to have the decision reversed when the full 15-member intermediate appeals court was asked to weigh in on the matter. Filing began Tuesday for these races instead.

Wednesday’s order by the justices means candidate filing is now suspended until the litigation is resolved. The Supreme Court says a panel of three trial judges hearing a pair of lawsuits must rule by Jan. 11, followed by likely appeals.

The delay is being granted “in light of the great public interest in the subject matter of these cases, the importance of the issues to the constitutional jurisprudence of this state” and “the need for urgency in reaching a final resolution on the merits at the earliest possible opportunity,” the order reads.

Primary elections for the U.S. Senate seat being vacated by GOP Sen. Richard Burr, all 14 U.S. House and 170 General Assembly seats, along with judicial and other positions, will now be held on May 17, according to the order.

The groups that filed the lawsuits – the North Carolina League of Conservation Voters in one case and voters backed by an affiliate of the National Democratic Redistricting Committee in the other – have said voters would be irrevocably harmed if elections went forward under the approved lines.

The lawsuits claim that the legislature manipulated the boundaries according to the political leanings of voters, the racial composition of voters, or both. In doing so, the suits say, lawmakers gave Republicans nearly unbreakable majorities in the General Assembly and nearly assured victories in at least 10 of the 14 US. House seats starting with the 2022 elections. The state is closely divided in statewide elections.

The groups that filed the lawsuits want the courts to order the General Assembly to redraw the lines.

“The fight continues but this is a very, very BIG step for democracy and fair maps in North Carolina,” Marc Elias, an attorney in the lawsuit backed by the Democratic group, tweeted after the Supreme Court’s order was released.

Lawyers for GOP legislative leaders who were sued say the boundaries are lawful, created through a transparent mapmaking process that prohibited the use of political data in map software programs. They also argue that state Supreme Court rulings in the early 2000s allow legislators to consider partisan advantage in mapmaking.

Last week, three trial judges rejected requests by the plaintiffs to block the use of the approved lines, setting appeals in motion. Wednesday’s order came from the entire Supreme Court, four of whose seven justices are registered Democrats.

“The court didn’t even articulate a legal or factual basis for suspending elections,” GOP state Rep. Ralph Hise, one of the lawsuits’ defendants, said in a news release. “The Democrats on the Supreme Court want districts that elect more Democrats, so they’re blocking every election in the state until they get their way.”

Scores of candidates who have already filed this week will remain candidates for those same offices when candidate filing resumes, unless they withdraw their candidacy at that time, the order reads. Candidate filing for all state and local races was slated to continue through midday Dec. 17.

The ruling means candidates will have several more weeks to raise money and campaign before the primary. Likely legislative and congressional candidates will have to wait and see if district line changes occur that could make them think twice whether to run or where.

The primary delay also extends the race to win party nominations to succeed Burr, who isn’t seeking reelection. Former Gov. Pat McCrory, U.S. Rep. Ted Budd and former Rep. Mark Walker remain among the announced candidates for the GOP nomination, with state Sen. Jeff Jackson and former Supreme Court Chief Justice Cheri Beasley among the Democratic hopefuls.

These high-profile candidates had not filed with the State Board of Elections as of Wednesday afternoon.