North Carolina’s Supreme Court on Wednesday ordered the state to bump its primary from March 8 to May 17, delaying what could be fiercely competitive races amid legal challenges to newly drawn political maps critics say are unconstitutional.

Delaying the primary, according to the court, will allow the state time to settle a pair of lawsuits challenging a Republican-led effort to redraw maps for seats in Congress and for North Carolina’s General Assembly. The decision to push back the March primary 10 weeks was based on “great public interest” in the cases, which the Supreme Court’s order adds should be resolved “at the earliest possible opportunity.”

The judges hearing those cases must make their rulings by Jan. 11, the order adds.

The directive delays all primary races across the state, not just those in areas affected by the redistricting. The move also puts a freeze on new candidate filings for anyone running for office in North Carolina in 2022. After the filing period opened on Monday, the State Board of Elections said more than 1,400 candidates filed to run. Those who already processed their paperwork should not have to refile.

The lawsuits challenging North Carolina’s redrawn maps were filed this past fall, The Washington Post reported. The suit filed in October by the North Carolina NAACP, Common Cause and a group of voters claims lawmakers failed to consider racial data when drawing the new maps. The North Carolina League of Conservation Voters filed a second lawsuit in November alleging the state’s General Assembly was grouping Black voters in some districts while breaking up Black voting blocs in others to weaken their electoral power.

Legal battles over redistricting are playing out in other states, too, as Democrats and Republicans seek to draw new political maps before next year’s midterms and the 2024 presidential race. The Justice Department sued Texas this month, claiming Republican lawmakers there discriminated against minorities when approving new congressional and state districts. And as the Virginia Supreme Court redraws state maps, Democrats there requested Republican nominees tapped to assist be removed over political conflicts of interest.

North Carolina’s redistricting maps faced immediate criticism when they were finalized on Nov. 4. The newly carved boundaries could give Republicans at least two more congressional seats in the House and help the GOP hold on to state-office majorities, the Associated Press reported.

The state will also pick up another congressional seat because of North Carolina’s population growth following Census Bureau results released this year. If a Republican is elected to the seat, Democrats would be closer to losing their narrow control of the House.

Candidates in North Carolina will also compete for a pivotal U.S. Senate seat in 2022, which could affect which party controls that chamber.

According to the AP, Republican state Sen. Ralph Hise said GOP lawmakers “complied with the law” when drawing the new maps, which could shape election outcomes for a decade. Others, including Rep. G.K. Butterfield (D-N.C.), slammed the maps as “racially gerrymandered.” Butterfield announced last month he would not seek reelection in 2022 after his 1st Congressional District was redrawn.

“The map that was recently enacted by the legislature is a partisan map,” Butterfield said, adding that “it will disadvantage African American communities.”

Redistricting battles in North Carolina are common. Robert Joyce, a professor at the University of North Carolina’s School of Government, told WUNC in July that North Carolina “has been in the courts on the question of redistricting — and especially on the question of racial discrimination in redistricting — more than any other state.”

Democratic Gov. Roy Cooper issued a statement Wednesday in support of the Supreme Court order, saying it “restores faith in the rule of law,” calling it necessary for the court to rule on “the constitutionality of these unfair districts before the next election.”

North Carolina House Speaker Tim Moore, a Republican, called the order to move the election deeply disappointing.

“To throw this process into chaos in the middle of filing leaves North Carolinians with uncertainty ahead of the election,” he said. “Despite this delay, we are confident that we will prevail at trial and our maps will stand.”

Mariana Alfaro contributed to this report.