RALEIGH, N.C. — The U.S. Supreme Court told North Carolina officials late Tuesday they must use some but not all of the state’s legislative districts that other federal judges redrew for this year’s elections.

The justices partially granted the request of Republican lawmakers who contend the House and Senate maps they voted for last summer were legal and didn’t need to be altered.

A three-judge panel determined those GOP-approved boundaries contained racial bias left over from maps originally approved in 2011 and violated the state constitution. So the lower-court judges hired a special master who changed about two dozen districts in all. The judges approved them last month.

The Supreme Court’s order means more than half of those districts redrawn by Stanford University law professor Nathaniel Persily will revert to their shapes from last summer. The order said House district changes made in the counties that include Charlotte and Raleigh because of state constitutional concerns are blocked while the full case is appealed, but changes made elsewhere to alleviate racial bias must be used.

The maps containing the partial changes will be used when candidate filing for all 170 General Assembly seats begins next Monday.

Boundaries approved by the General Assembly last August kept Republicans in a position to retain veto-proof majorities in the chambers, which has helped them advance their conservative-leaning agenda this decade. But Democrats are bolstered after successful elections in other states last year. Tuesday’s ruling means Democrats could find it harder to win more House districts than they hoped.

Dozens of North Carolina voters originally were successful in overturning the 2011 districts as racial gerrymanders. They subsequently asked Chief Justice John Roberts, who receives appeals from the state, to allow the lower court’s directive and require the changes approved by the three judges be used.

The Republicans’ request was considered by the entire court and the order reflected division among the justices. Justices Clarence Thomas and Samuel Alito would have agreed to block all of the changes to the maps approved by the lower-court panel. Yet Justices Ruth Bader Ginsburg and Sonia Sotomayor would have denied the GOP’s request entirely, according to the order.

The three-judge panel had agreed the changes the Republicans made to five Charlotte- and Raleigh-area House districts had violated the state constitution’s provision against mid-decade redistricting. But GOP legislative leaders argued the issue was an issue that needed to be settled in state court and not by the federal judges.

Still, lawyers for the voters who had filed suit praised the Supreme Court’s decision to allow the elections to go on with districts that Persily drew to reflect continued racial bias in two House and two Senate districts. In court filings, they pointed out three previous elections this decade — 2012, 2014 and 2016 — occurred under what have been deemed unconstitutional maps, and blocking the judges’ orders would have meant another election under unlawful boundaries.

“Finally, after years of litigation, North Carolinians will be able to elect their state legislators from districts that do not discriminate against voters based on their race,” said Allison Riggs, the lead attorney for the voters. “This decision represents a major victory for all North Carolinians who value fair elections and democratic principles.”

Republican Rep. David Lewis, the House redistricting committee chairman, said he was pleased the Supreme Court blocked “the lower court’s egregious attempt to rule on purely state-law claims” and most of Persily’s districts. “I am confident that the court’s full review of this case on the merits will ultimately vindicate the General Assembly’s entirely enacted plans.” Riggs also predicted full victory from the Supreme Court or in state court.

The Supreme Court ruled in favor of North Carolina Republicans last month when the justices delayed enforcement of another three-judge panel’s decision that struck down the state’s congressional map for excessive partisanship. Republicans have been in the courts most of this decade trying to defend their redistricting decisions against challenges by Democrats or their allies.