Shortly after North Carolina Republicans took over the state legislature in 2010, they drew up new district maps to determine the boundaries of congressional and state legislative districts, carving them up to their partisan advantage. On Friday, a federal court declared that two of those congressional districts were gerrymandered in a way that was racially discriminatory, deliberately clustering many black voters — who often vote Democratic — into large, oddly shaped districts in violation of their constitutional rights.

“Elections should be decided through a contest of issues, not skillful mapmaking,” Judge Max Cogburn wrote in an opinion posted by Raleigh CBS affiliate WRAL. “Today, modern computer mapping allows for gerrymandering on steroids, as political mapmakers can easily identify individual registrations on a house-by-house basis, mapping their way to victory.”

By clustering black voters into just a couple of districts, lawmakers deprive African-Americans from having a proportional voice in government. “What packing African-American voters into districts accomplishes is it weakens African-American voters’ weight elsewhere in the state,” says Michael Li, a senior counsel focused on redistricting at NYU’s Brennan Center for Justice. “If you drew the districts a little more naturally, you might have two African-Americans elected instead of one.”

This sort of case is not uncommon, Li explains. America on the whole, and North Carolina in particular, have a rich history of legal battles around redistricting. But the conversation around packing minority voters into a single district has changed, says Li. “It used to be that African-Americans wanted districts with a high African-American percentage because African-Americans voted at lower rates and had lower voter-registration rates. Unless you had a high percentage of African-Americans in the district you might not elect the African-American-preferred candidate.”

But now, across the American South and in many communities elsewhere, African-Americans actually have higher voter registration rates and turn out to vote in higher numbers than their white neighbors. They also tend to vote reliably Democrat.

“In much of the South a district, if it’s 40 percent African-American, or in some cases even 35 percent African-American, will elect an African-American-preferred candidate. African-Americans are just that cohesive politically. That’s really been a great story and a great accomplishment,” Li continues. “But what you saw is that white Republicans in the South continued to pretend, I think because it was to their advantage, that you needed to pack African-Americans into districts in order to give them the ability to elect. And the defense in all of these cases has been saying, ‘We were just trying to help African-Americans,’ and African-Americans say ‘No, no, you’re actually hurting us.'”

This effort — to draw districts along racial lines — led to some strange results. North Carolina journalists often describe the 1st District as resembling an octopus perched in the northeast portion of the state, with one long tentacle dangling down into the center. The lawsuit points out that this huge district’s meandering perimeter is 1,319 miles, the distance from Chapel Hill to Austin, Texas. Further west, the 12th District is snake-like, and wriggles from north to south, crisscrossing Interstate 85 for roughly a hundred miles. These bizarrely shaped districts cover diverse areas where aside from race, voters have little in common.

Activist groups that have been a thorn in the side of the conservative North Carolina legislature celebrated Friday’s ruling. “This ruling by all three judges is a vindication of our challenge to the General Assembly of North Carolina writing racially biased ‘apartheid’ voting districts to disenfranchise the power of the African-American vote,” Rev. William Barber, president of North Carolina’s NAACP chapter, told the Raleigh News & Observer. Barber is a leader of the coalition of protesters who, in a series of events dubbed “Moral Mondays,” have spoken out against policies put in place by the state legislature and Republican Governor Pat McCrory, including redistricting, the state’s voter ID law, restricting access to abortion clinics, and legislation to opt out of the Obamacare Medicaid expansion.

The Republican leaders responsible for the district maps denounced the decision, which they say was released too close to the state’s March 15th primary. In the 12th District, WRAL reports, a few hundred absentee ballots already have been cast. “This decision could do far more to disenfranchise North Carolina voters than anything alleged in this case,” said Sen. Bob Rucho and Rep. David Lewis in a joint statement. The court gave lawmakers two weeks to draw up new maps, which would require a special session of the legislature.

While it’s not ideal, “certainly maps can be redrawn that fast,” responds the Brennan Center’s Michael Li. “Redistricting legislation rarely offers great options.” The Supreme Court could also grant an emergency stay of the federal court’s decision, which the defendants already have requested.

Voting advocates in the state are also awaiting another redistricting decision from federal court, this one dealing with the state’s legislative districts, which conservatives also redrew in 2011. What’s more, a federal court recently heard a challenge by the NAACP, the Justice Department and others to the state’s controversial voter ID law, which could disenfranchise hundreds of thousands of North Carolina voters.

In the wake of controversy around the 2011 redistricting, good government groups are arguing that it is time for North Carolina to follow the lead of other states, and find a new way of drawing district boundaries. In the 2015 off-off-year election, Ohio voters overwhelmingly supported a redistricting reform measure, setting stricter rules and ensuring the minority party more of a say in the determination of district lines. This year, nine other states are attempting to make similar reforms.

The recent federal court ruling “once again shows the need for North Carolina to establish a nonpartisan system for drawing our state’s voting maps,” said Common Cause North Carolina director Bob Phillips. “For years, partisan gerrymandering has led to costly litigation and deprived North Carolina voters of having a real choice and a voice in our elections. Fortunately, a growing number of citizens and leaders across the political spectrum agree that North Carolina should adopt an independent redistricting process.”