This is one of the insanely racially gerrymandered NC state legislative districts that just got struck down #NCpol pic.twitter.com/hg2zX0XLCj — Stephen Wolf (@PoliticsWolf) August 11, 2016

North Carolina Republicans are on a losing streak. In July, the U.S. Court of Appeals for the 4th Circuit invalidated the GOP-dominated Legislature’s brazen efforts to restrict black voting, holding that lawmakers’ intentional racial discrimination violated the Equal Protection Clause. Now a three-judge federal district court has struck down Republicans’ outrageous race-based gerrymander as yet another violation of voters’ equal-protection rights. (North Carolina can appeal the decision directly to the Supreme Court—but given its current composition, the court is quite unlikely to reverse, meaning Thursday’s decision will probably stand.)

The district court’s 167-page opinion, handed down Thursday, methodically analyzes 28 state-level legislative districts that the plaintiffs, a group of minority North Carolina voters, claimed were unconstitutional. Each district, the court found, was “racially gerrymandered in violation of the Equal Protection Clause,” because “race was the predominant factor motivating the drawing of all challenged districts.” Moreover, the court held that, contrary to the Legislature’s assertions, lawmakers hadn’t used race as a means to comply with the federal Voting Rights Act; they had used it to entrench their own power, diluting minority voters’ own voting rights in the process.

Because the 2016 election is mere months away, however the court granted North Carolina a reprieve. The panel ordered the Legislature to redraw the districts “to correct the constitutional deficiencies” only after the next election, during next year’s legislative session. And even then, the Legislature that redraws the maps will almost certainly be overwhelmingly Republican. Indeed, some drafters of the new maps may be the very same legislators who drew the old, unconstitutional maps. The new map will surely remain gerrymandered, if not quite as blatantly so.

Still, Thursday’s decision is a major victory against gerrymandering in a state that had taken the practice to a new extreme. It also reaffirms the federal judiciary’s sudden willingness to push back against state legislatures that curb their citizens’ voting rights in order to keep their party in power. Gerrymandering, both racial and partisan, strikes at the heart of equal protection of the law. It’s heartening to see courts finally recognize that fact—and refuse to let legislatures get away with this unconstitutional power grab.