It’s official: Pennsylvania will get a new US House of Representatives map for 2018, replacing an old map the state’s supreme court struck down as a Republican partisan gerrymander. A last-ditch effort from the state GOP to block the map failed Monday, as the US Supreme Court declined to intervene in the matter.

The new map is positively fantastic news for Democrats in their effort to take back the House this fall. “Democrats get everything they could want,” the New York Times’s Nate Cohn tweeted when he first saw the map. “With few exceptions it’s Democrats’ dream come true,” the Cook Political Report’s Dave Wasserman tweeted. “GOP not going to like this at all.”

The net impact of the new map is:

It creates two new districts where Democrats are favored that didn’t exist in the previous map (and in one of those, they’re overwhelmingly favored).

It keeps the same number of very closely divided swing districts that existed before (three).

It changes one district that had been overwhelmingly Republican to be one where the GOP is favored but not entirely certain to win (Trump won the new district by about 9 points).

Overall, it reduces by one the number of safe Republican districts (where Trump won by more than 15 points), and by one the number of lean Republican districts (where Trump won by 5 to 15 points).

So open seats held by retiring GOP Reps. Pat Meehan and Charlie Dent are more likely to flip, Republican incumbents like Rep. Ryan Costello and Keith Rothfus are now more embattled, and even GOP Rep. Scott Perry is no longer assured of skating to reelection.

Pennsylvania’s old and new maps, compared

After their landslide victories in the 2010 midterm elections, Republicans gerrymandered Pennsylvania within an inch of its life, in what Sean Trende of RealClearPolitics suggested could be “the gerrymander of the decade.” Here’s the map the GOP came up with:

Note above the oddly shaped districts surrounding Pittsburgh on the southwest of the map — the 12th and 18th — and the truly bizarre mess around Philadelphia on its east side, especially the contortionist 6th and 7th districts.

Ugly-looking districts don’t always point to gerrymandering, but in this case, they do — Republicans tried to pack Democratic-leaning areas together into very few districts while surrounding the state’s big cities with districts Republicans would win comfortably.

To get a sense of how powerful Pennsylvania’s gerrymander was, consider that in 2012, Democratic candidates won slightly more votes in US House elections and Barack Obama won the state. But the state’s 18 House seats didn’t split 9-9 between the parties — instead, Republicans won 13 seats there, and Democrats just won five. No seats changed partisan hands in the 2014 or 2016 elections, either.

But this January, the state Supreme Court — which has a Democratic majority — struck down the existing map as a partisan gerrymander that, a majority of justices wrote, violated the state constitution. The Republican state legislature and Gov. Tom Wolf (D) failed to agree on a new map, so the court instituted one itself.

The new map, below, looks cleaner, splits fewer counties, and will likely lead to many more competitive elections:

So in the southwest of the map, Pittsburgh is suddenly surrounded by one safe Republican district (the 14th) and one swing district (the new 17th), rather than the two safe Republican districts that existed before. Around Philadelphia in the east, meanwhile, the conspicuous contortions are now gone.

The new map is much more favorable to Democrats than most election wonks expected, given the geographic patterns of where people actually live in Pennsylvania. Indeed, as Trende wrote in an interesting tweetstorm, “the consistent, subtle choices made make clear that this map was drawn with an eye toward shifting multiple districts leftward” — to increase competitiveness.

But it doesn’t seem to be an overwhelmingly or unfairly Democratic map, since, after all, Trump still won 10 of the 18 new districts. It’s a map designed, seemingly deliberately, to compensate for the party’s geographic disadvantages and give them a fighting shot in several districts.

What the map means for 2018

The New York Times’s Nate Cohn, Matthew Bloch, and Kevin Quealy put together this extremely helpful breakdown of the new partisan numbers for each new district, and you should really read the whole thing.

But my top-level takeaways from their new numbers are as follows.

First off, districts’ potential competitiveness can be measured in different ways, but if we take the obvious measurement of how much each presidential candidate won in each district in 2016, we move from:

11 districts Trump won by 5 points or more in the old map to 9 in the new map

Four districts Clinton won by 5 points or more in the old map to 6 in the new map

Three swing districts that neither presidential candidate won by more than 5 points in both maps

So even from that bird’s-eye view pegged to 2016 results, it’s clear that, on net, two districts became much more Democratic in the new map.

Now, let’s get more specific about what the changes mean for particular districts and members of Congress:

The open district held by Rep. Pat Meehan (R) , who is retiring due to a sexual harassment scandal, is changed from a closely divided district to one Clinton won by 28 points — making for a near-certain Democratic pickup there (the Fif th D istrict , in the new numbering)

, who is retiring due to a sexual harassment scandal, is changed from a closely divided district to one Clinton won by 28 points — making for a near-certain Democratic pickup there (the , in the new numbering) Rep. Ryan Costello (R) is moved from a very evenly divided district to one Clinton won by nearly 10 points (the Six th D istrict , under both the old and new numbering).

is moved from a very evenly divided district to one Clinton won by nearly 10 points (the , under both the old and new numbering). Rep. Brian Fitzpatrick (R ) represents a swing district that becomes just slightly more Democratic (the Fir st D istrict , in the new numbering).

) represents a swing district that becomes just slightly more Democratic (the , in the new numbering). The area represented by retiring Rep. Charlie Dent (R) changes from a district Trump won by 8 points to a district Clinton narrowly won (the Seven th D istrict in the new numbering).

changes from a district Trump won by 8 points to a district Clinton narrowly won (the in the new numbering). Rep. Keith Rothfus (R) , who represented a safe Republican district, is suddenly thrown into a swing district where Conor Lamb, the impressive Democratic candidate who won last week’s special election under the old map, will run. (This is the new 17th D istrict .)

, who represented a safe Republican district, is suddenly thrown into a swing district where Conor Lamb, the impressive Democratic candidate who won last week’s special election under the old map, will run. (This is the new .) Then Rep. Scott Perry (R) is moved from a safe Republican district to a district Trump won by 8.9 points — a solid win, but not an overwhelming one. With a strong Democratic challenger or a big Democratic wave, this district now looks at least potentially flippable. (This is the new 10th District.)

All in all, that makes six Republican-held seats that suddenly have a more Democratic electorate — with the open seats held by Meehan and Dent, and the seats currently held by Costello and Rothfus, suddenly growing much more likely to flip. However, there’s also one notable change the other way, as Rep. Lloyd Smucker (R) moves from a lean Trump district to a solidly Republican one (the new 11th District).

In contrast, there are no comparable changes that put any of the few districts held by Democrats into play. Only one of them, Rep. Matt Cartwright (D), currently represents a district Trump won (by about 10 points), and his district’s partisan breakdown looks like it will stay about the same, per the Times. (This will be the new Eighth District.) Beyond that, there were four more safe Democratic seats before and after the new map.

The big picture is that this new map is enormously good news for Democrats in their effort to take back the House. Republicans currently hold the majority in the entire House of Representatives by 24 seats (which will drop to 23 if Conor Lamb’s victory last week is certified). Now, all of a sudden, their chances in several key Pennsylvania races have sharply improved — there are now five very plausible pickup opportunities in this state alone. If the party can score victories on this more favorable new turf, it will be a major help in their efforts to retake the chamber.