Georgia is starting to look like a swing state, and Republicans aren’t happy about it. In 2016, Donald Trump defeated Hillary Clinton by just 5 points, and demographic trends may continue to erode Republicans’ grasp on the state. Yet because of the state Legislature’s egregious gerrymandering, Republicans hold a near-supermajority in the state House. They’d like to regain an actual supermajority in 2018. So last week, the House passed a bill that would kick black voters out of several GOP districts, trading them for Republican-friendly white voters. The bill will become law with the approval of the Republican-controlled Senate and the signature of Republican Gov. Nathan Deal—both of which seem likely given the enthusiasm that the Georgia GOP has already shown for the measure.

As Aaron Gould Sheinin notes in the Atlanta Journal-Constitution, the gerrymandering bill was introduced with no prior notice and passed in just two days. Its Republican sponsors didn’t even bother to inform Rep. Sheila Jones, a Democrat, about it—despite the fact that it takes two (predominantly white) precincts from her district and gives her two (predominantly black) precincts in return. Republican Rep. Rich Golick will receive Jones’ white precincts. He, along with several other recipients of white-majority precincts, has seen his margins of victory narrow in recent years, hence the desire for more white voters. The AJC explains:

The biggest changes strengthen Republican districts that have become more competitive. Golick won re-election in November with 53 percent of the vote over Democrat Erick Allen, down from the 60 percent to 40 percent margin by which Golick won in 2014. Golick declined comment.

In south Metro Atlanta, Rep. Brian Strickland, R-McDonough, has seen his margin of victory fall from 6 percentage points in 2012 to less than 2 percentage points in 2016. HB 515 takes several GOP-heavy precincts out of Griffin Republican Rep. Karen Mathiak’s neighboring District 73 and gives them to Strickland.

Is this legal? Almost certainly not! Under the Equal Protection Clause, Georgia is barred from using race as the “predominant factor” in redistricting. Indeed, last Wednesday, the very same day Georgia Republicans introduced the bill, the Supreme Court affirmed that a gerrymander violates equal protection when a state “subordinates traditional race-neutral districting principles to racial considerations” and views race as the key criterion in redistricting.

Georgia Republicans do not even pretend to have a legitimate reason for this gerrymander. Indeed, they haven’t really attempted to explain why the bill is necessary at all. The timing is very strange—redistricting typically occurs after each decade’s census—and the purpose is obvious: to bolster Republicans’ electoral advantage by removing black voters from their districts and replacing them with whites.

A generous interpretation of the bill might view it as a partisan gerrymander—an effort to dilute the power of Democratic voters who just happen to be black. Partisan gerrymandering presents legal problems of its own: It discriminates against voters on the basis of their viewpoint, burdening their First Amendment right to free expression and association. Unfortunately, the Supreme Court has not yet decided upon a way for the judiciary to remedy it. But the partisanship defense probably won’t cut it in this instance, where race is fundamentally tied up with political affiliation, and legislators appear to have used race as a proxy for political affiliation, a constitutionally dubious scheme. The new gerrymanders, moreover, cannot be explained by anything like the “traditional districting principles” outlined by the Supreme Court. Any reasonable observer of these new maps—and the legislative process that produced them—would conclude that race is clearly the predominant factor.

It is a fundamental tenet of democracy that voters choose their representatives, not the other way around. But Georgia Republicans have decided that sometimes democracy is a little too inconvenient and taken it upon themselves to shed some black voters and gain some white ones. That is impermissible under the Equal Protection Clause. And should their bill become law, Republicans will find themselves struggling to explain in court why they abruptly decided to reshuffle districts on the basis of race.