North Carolina legislators finished redrawing House and Senate district maps Wednesday, beating a court-ordered deadline later this week. Now Republicans who drew them must see whether federal judges agree they’ve cured problems with racial bias in the previous maps.

Largely along party lines, the House voted 68-47 to approve the Senate map just a few hours after the Senate voted 30-15 for the House boundaries. Each chamber had approved its own lines earlier in the week, following robust debate. Redistricting legislation is not subject to Democratic Gov. Roy Cooper’s veto.

The General Assembly now must send the approved maps and related data and explanation to a panel of three federal judges by late next week. The judges could sign off on the maps for the 2018 elections or order more changes, draw their own maps or send them to an outside expert for redrawing if they don’t believe GOP mapmakers fixed them correctly.

The same judges last year threw out 19 House and nine Senate districts as illegal gerrymanders because GOP leaders failed to justify using race as the predominant factor in drawing them. Following a U.S. Supreme Court ruling in June affirming their decision, the lower-court judges ordered new maps to be approved by Friday.

Nearly all of the districts that were thrown out had majority-black voting age populations, which critics say allowed surrounding districts to become more white and Republican, favoring GOP candidates.

Republicans have held veto-proof majorities in both the House and Senate since the most recent maps were used in elections for the first time in 2012. District-specific results of recent statewide elections show Republicans have a good chance to retain those strong majorities should elections be held under the new maps.

Republican redistricting leaders said the House and Senate maps — which redraw most but not all of the 170 General Assembly districts — complied with the court’s ruling, even though the criteria approved by legislators specifically left out the use of the racial data of the electorate.

Still, Rep. David Lewis of Harnett County, a top redistricting leader, pointed to statistics provided by Democrats about the racial composition of the districts. They show the number of majority-black districts falls dramatically in the new maps.

The Senate plan complies with state and federal law and “remedies defects the court found in the previous map,” Lewis said on the House floor.

Democrats warned it was wrong to not consider racial data. They said racial gerrymanders still exist under the new plans and they predicted the judges would strike down the new maps, too, increasing redistricting legal expenses for the legislature that already exceed $4 million. They also said some districts in and around Charlotte and Raleigh also were needlessly altered, violating the state Constitution.

“Why we would position ourselves for these challenges, I can’t understand,” said Sen. Angela Bryant, a Nash County Democrat. “We’re even adding new challenges to the ones … that we’ve already lost on.”

Democrats also said Republicans ignored scores of speakers at hearings who wanted partisanship taken out of drawing the maps, perhaps through a special redistricting commission with members of the public.

“The right thing to do here is to let citizens draw the lines,” said Rep. Billy Richardson, a Cumberland County Democrat.

The proposed plans put three pairs of current House members and four pairs of senators in the same districts. Two incumbent senators within these pairings already have announced they won’t run in 2018. The maps also created seven districts where no incumbent currently lives.