Republican officials in the General Assembly said Tuesday evening that they intended to appeal the ruling, which many elected officials and political strategists were still scrambling to digest. Dallas Woodhouse, the executive director of the North Carolina Republican Party, criticized Judge Wynn and accused him of “waging a personal, partisan war on North Carolina Republicans.”

In a separate post on Twitter, Mr. Woodhouse argued that Judge Wynn had concluded that North Carolina’s Republicans “should not be allowed to draw election districts under any circumstances under any set of rules,” an effort he called “a hostile takeover” of the General Assembly and legislatures nationwide. Republicans could ask the Supreme Court to stay the decision and allow the disputed map to be used this year.

But critics of the congressional map welcomed a decision that was notable for its tartness and urgency.

“Clearly, the courts have realized that they do need to step in and police extreme partisan gerrymanders, and the court recognized that North Carolina’s gerrymander was one of the most extreme in history,” said Ruth Greenwood, senior legal counsel at the Campaign Legal Center and a lawyer representing some of the map’s challengers.

The chairman of the North Carolina Democratic Party, Wayne Goodwin, said the decision was “a major victory for North Carolina and people across the state whose voices were silenced by Republicans’ unconstitutional attempts to rig the system to their partisan advantage.”

The judges issued their decision fewer than 24 hours before the General Assembly was to convene in Raleigh for a special session. The ruling unmistakably placed lawmakers on the clock, giving them two weeks to present a “remedial plan” and declaring that the court would institute its own map if it finds the new district lines unsatisfactory.

“Politically, this gives hope to Democrats,” said J. Michael Bitzer, a professor of political science at Catawba College, which is near Charlotte. “I can imagine the Republicans being furious, but they have to see political reality, and it’s not just in the next two weeks: It’s come November.”