Just when you thought you had seen it all, the now-stacked, right-wing, corporatist U.S. Supreme Court actually made a progressive ruling on a case that is likely to have far-reaching effects on similar litigation going on in courts across the nation.

The case, Cooper v. Harris, involved two electoral districts in the State of North Carolina that had been heavily gerrymandered. In a 4-3 decision (neophyte Gorsuch abstained as he had not heard the arguments, which were presented in December), the Court ruled that the Tarheel State’s 1st and 12th legislative districts had been gerrymandered on a racial basis, thereby violating the Equal Protection Clause of the 14th Amendment of the Constitution.

Amazingly, the swing vote was arch-conservative Clarence Thomas. Or perhaps his vote was not so amazing. Although Thomas is a die-hard Republican, on this occasion, he overcame his opposition to virtually all things liberal and progressive and voted his conscience. Thomas, who was born into grinding poverty during the Jim Crow Era, was abandoned by both parents, raised by a strict grandfather, and faced rejection among other blacks because of his dark skin. Thomas has a reputation for ruling against the interests of his fellow African-Americans, yet he has always consistently stood against the practice of racial gerrymandering.

This particular case has its roots in a 1996 case, Shaw v. Hunt. Ironically, at that time it was the Democrats – then in control of North Carolina’s legislature – that had drawn the gerrymandered districts. As those districts appeared to be drawn based on racial makeup, a GOP organization filed suit against the state on grounds that the districts were in violation of the 14th Amendment. The defendants argued that the districts had been drawn in order to comply with the 1965 Voting Rights Act (VRA), which among other things, prohibits states from diluting minority votes and mandates the establishment of predominantly minority districts in those states with a history of racism. For this reason, the Democratically-controlled North Carolina legislature argued that the 1st and 12th Districts were created in order to favor African-American voters.

The case made its way to the U.S. Supreme Court. In a 5-4 ruling, the Court found that the districts in question had indeed violated the 14th Amendment. While this satisfied the GOP plaintiffs, it should be noted that the districts had been drawn with Republican assistance in order to pack primarily Democratic-voting African-Americans into a small number of districts – thereby protecting their own legislative seats.

In the wake of that case, North Carolina redrew the boundaries, but in 1997, a District court found that those new boundaries had also been established primarily because of race. In 2001, the issue again came before the Supreme Court in Easley v. Cromartie. This time, the Court reversed its previous position, ruling that such gerrymandering was indeed permissible – even when race was associated with political affiliation, as has historically been the case with largely Democratic-voting African-Americans. The Court’s reasoning was that while racial gerrymandering may be illegal under the 14th Amendment, there is nothing wrong with drawing districts according to party registration.

That ruling wound up opening the proverbial gates of gerrymandering hell. Since then, GOP-controlled state legislatures across the country (particularly in the South) have engaged in the most egregious kind of gerrymandering, removing African-American voters from their own districts and cloistering them in Democratic ones with little clout. In this way, the Republicans have managed to cement their control and win elections over and over again – despite the fact that their agenda is deeply unpopular with the majority of voters. Every time African-American voters have brought the issue before the court, their arguments have been shot down on the basis of the Cromartie decision.

This week, the SCOTUS once again reversed its position – and this time, it bodes ill for GOP gerrymandering skulduggery. In writing the majority opinion, Justice Elena Kagan writes:

If legislators use race as their predominant districting criterion with the end goal of advancing their partisan interests – perhaps thinking that a proposed district is more ‘sellable’ as a race-based VRA compliance measure than as a political gerrymander and will accomplish much the same thing – their action still triggers strict scrutiny. In other words, 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.”

In short: race and political affiliation are not necessarily separate categories.

Justice Thomas may be a right-wing Republican and would have no problem completely depriving the Democrats of any political power if he had his way. Nonetheless, to his credit, he stood up for the rights of ethnic and racial minority voters.

This week’s Shaw decision doesn’t mean that partisan gerrymandering will end next week, since drawing districts on the basis of party registration is still legal. This case is only a prelude to forthcoming legal battles over gerrymandering.

Currently, a case from Wisconsin, Gill v. Whitford, is making its way through the courts. Plaintiffs argue that the state’s assembly map for 2011, favoring the GOP, is also in violation of the 14th Amendment. Plaintiffs further argue that the redistricting has effectively deprived Wisconsin’s Democratic voters of their right to free speech, and is therefore a violation of the First Amendment as well.

It will be interesting to see what impact this week’s decision will have on this and other cases moving forward.