The final votes in North Carolina on the new maps followed days of drafting by legislative committees from the two chambers, their work displayed on hearing-room screens and live-streamed online to meet a court requirement that the process be conducted entirely in public.

Leaders of both parties called the process the most transparent in state history; Republicans had drawn the invalidated set of maps in secret, relying on advice from a Republican Party expert on gerrymandering.

Senator Dan Blue, the leading Democrat in that chamber, said the drafting of the Senate map had been “a remarkable experience, especially when you consider the current political climate” in the critical swing state.

Republicans who controlled both mapmaking committees made an elaborate effort to underscore the nonpartisan nature of the work, which began with a lottery-style selection of two randomly generated political maps as templates for redrafting. The maps were taken from thousands that plaintiffs in the court case had produced to make a statistical case against the Republican gerrymandering.

Critics quickly noted, however, that the Senate baseline was taken from a set of random maps that accounted for incumbency in a chamber where nearly six in 10 incumbents are Republicans. The House baseline did not consider incumbents — but a central principle of the drafting process was to allow incumbent legislators, 55 percent of them Republicans, a chance to draw their own district boundaries.

The House baseline was further complicated by the fact that it “double-bunked” a number of Democratic legislators in the same districts, forcing them to divide the districts’ Democrats among themselves to increase their chances of re-election. Only a handful of Republicans faced the same problem.

The court order had stated that mapmakers could consider incumbency in setting boundaries, but did not require it.