A U.S. Supreme Court ruling Monday in a North Carolina gerrymandering case could have major implications for the drawing of political maps nationwide — including Texas' long-disputed redistricting maps.

In a 5-3 decision seen as a major victory for minority rights groups, the court struck down two North Carolina congressional districts, ruling that lawmakers illegally packed African-American voters into them, minimizing their political influence in the state.

And in doing so, some experts say, the justices weakened a key argument that North Carolina, Texas and other southern states have made while defending gerrymandering that seemed to target minority voters: That such efforts were legal, so long as they were motivated by politics — and not race.

For years, courts have wrangled with a tough question: How to untangle the roles of race and partisanship in redistricting, the once-per-decade exercise of redrawing political maps to accommodate changing populations. It’s a crucial exercise because partisan gerrymandering is broadly viewed as constitutional, while race-based map-drawing is not.

But the legal calculus is complicated by the fact that black and Latino voters tend to favor Democrats, for instance.

Monday’s Supreme Court ruling said plaintiffs could successfully challenge the use of race in redistricting, even if lawmakers claim they were motivated by politics.

"The sorting of voters on the grounds of their race remains suspect even if race is meant to function as a proxy for other [including political] characteristics," said a footnote in Justice Elena Kagan's majority decision.

Rick Hasen, a professor at the University of California, Irvine's law school who specializes in election law, called the ruling a major victory for voting rights plaintiffs.

“Holy cow this is a big deal,” he wrote Monday in his widely cited Election Law Blog. “It means that race and party are not really discrete categories.”

The ruling comes as a years-long battle over Texas maps is again heating up.

In March, a three-judge federal panel in San Antonio ruled that lawmakers knowingly discriminated in drawing the state's congressional map, and flagged particular violations in the 23rd Congressional District, represented by Will Hurd, R-Helotes; the 27th, represented by Blake Farenthold, R-Corpus Christi; and the 35th, represented by Lloyd Doggett, D-Austin. And in April, the judges concluded in a 2-1 ruling that the 2011 Texas Legislature intentionally diluted the clout of minority voters statewide — and specifically in a number of state House districts across Texas.

The state is appealing those rulings.

Though Texas' court dispute isn't precisely the same as North Carolina's, they both feature a similar line of defense — that partisanship, not race, motivated map drawers.

In one 2013 brief, for instance, then-Texas Attorney General Greg Abbott wrote “plaintiffs must prove that the Texas Legislature’s redistricting decisions were motivated by unconstitutional racial animus rather than a desire to maximize the Republican Party’s electoral prospects.”

But race and partisanship are intertwined in Texas, and opponents of the maps successfully argued — in some districts, at least — that the Republican-dominated Legislature advanced the party’s interests by looking to race.

Monday’s Supreme Court decision only adds heft to that idea, lawyers challenging the state say, making it more difficult for Texas and other states to argue politics can shield racial considerations.

“It undermines entirely their protestation that this is about politics: Yes, we’re picking apart Latino voting boxes and African-American voting boxes – we’re not doing it to them, we’re doing it to the Democratic Party,” said Jose Garza, an attorney for the Mexican American Legislative Caucus, a lead plaintiff in the case. “That’s just not going to hold up.”

Gerry Hebert, executive director of the Campaign Legal Center and an attorney for other plaintiffs in the case, said the Supreme Court “expressly rejected” part of Texas’ redistricting defense.

Texas Attorney General Ken Paxton’s office did not respond to a request for comment on the North Carolina ruling.

Lawyers in the Texas redistricting case will next square off during a five-day hearing in July. The same San Antonio panel will consider what the state’s political boundaries should look like for the 2018 elections.

Paxton’s team will make a different argument in an effort to maintain the status quo: That any court rulings on the state’s 2011 maps should have no bearing on the coming elections because they were never used. Instead, the state has conducted recent elections under boundaries quickly drawn by the court ahead of the 2012 election and adopted by the Legislature in 2013.

Relying on the court's judgment on how the maps should be drawn is “the best legal advice anyone can get,” Matthew Frederick, of Paxton's office, told judges at an April hearing.

The state’s legal opponents argue that the lawmakers’ swift adoption of the temporary 2013 maps should not insulate them from what they call lingering discrimination created by the state's 2011 redistricting effort. On the congressional map drawn by the court, for instance, the boundaries of two districts — Farenthold’s 27th and Doggett’s 35th — are identical to those flagged as discriminatory by the same court in 2011.

As lawmakers adopted the court-drawn plan, Garza said in an interview, “They’re incorporating the intent of 2011.”