When President Donald Trump won the White House in 2016, he did it by hijacking the Republican Party. Now, after what happened in the midterm elections, it’s clearer than ever that the president’s fortunes and his party’s future are at odds.

During the final weeks of the fall campaign, Trump put the GOP on his back, assuring that the elections would become even more a referendum on his performance than the typical midterm in a president’s first term. As a result, Republicans paid a hefty price, with potentially longer-term implications.

Yes, the GOP added to its narrow Senate majority. But that came by reinforcing what already is the party’s greatest strength: Trump with his rallies maximized support in solid red states, especially among voters in rural areas and small towns.

But the Trump-centric strategy backfired spectacularly in the race for House control, as suburban voters revolted against Trump, delivering a rebuke to his party’s candidates in district after district. Democrats have gained 39 seats in the House with the possibility of hitting 40 depending on the outcome of the still uncalled election in California’s 21st District.

If the enthusiasm for Trump in rural and small-town America constituted the story after 2016, the suburban revolt, led by women, has become the story of 2018. The more you analyze the House results, the more the GOP’s suburban problem stands out.

One way of looking at the House results is by the population density of congressional districts. CityLab categorizes congressional districts along a continuum of six categories, ranging from “pure rural” to “pure urban.” In between are four categories of suburban districts, from the less dense to more dense.

Take the 11 most rural districts that were on the competitive lists assembled by the Cook Political Report before the election. Going into the election, Republicans held nine of the 11. When the new Congress assembles in January, they will still hold eight of the 11.

GOP losses in the next category, what are called suburban-rural districts, were also modest. Seven of 19 districts changed parties: Five shifting to the Democrats and two to the Republicans. Republicans had 17 of these districts going into the election and will end up with either 13 or 14 in the new Congress.

But the damage grows exponentially in the next two categories. There were 30 districts categorized as suburban-sparse. Heading into the election, the GOP held every one. Democrats now will have 16 to the GOP’s 14.

In the 15 districts described as suburban-dense, something similar happened. Republicans held all 15 before the election. In January, they will have control of just three. In the nine districts categorized as urban-suburban, Republicans will go from holding seven to holding just one.

Democrats made big gains in 12 districts held by Republicans that were won by both Hillary Clinton in 2016 and Barack Obama in 2012, flipping nine of them. In another 13 districts won by Clinton in 2016 and by Mitt Romney in 2012, Democrats flipped another 12.

Democrats also converted eight of 12 districts that Trump won in 2016 but that Obama had won in 2012. Republicans did better in the districts won by Trump in 2016 and Romney in 2012, which constituted more than half of all the competitive districts, but Democrats still managed to convert nearly a third of them.

California delivered the most significant blow to the Republicans. The party there has been in a long decline, and Trump’s presidency has made things worse. Democrats will pick up at least six seats in California, with a seventh possible. The lone competitive seat that remained in GOP hands was that of Rep. Duncan Hunter, who is under indictment for using campaign funds for personal use.

GOP strategist Bruce Mehlman produced a series of charts analyzing the 2018 election, including one showing various fault lines within the electorate. They include divisions based on race, age, gender, education and geography. Race — whites vs. nonwhites — remains the biggest divide of all. But geography is by far the fastest growing, and now the urban-rural divide is almost as wide as the divide between whites and nonwhites.

That political division can still work to Trump’s advantage as he looks to his re-election campaign, as an analysis of the gubernatorial results in Wisconsin in 2018 and 2014 by Craig Gilbert of the Milwaukee Journal Sentinel illustrates. Gilbert found that Republican Gov. Scott Walker, who was narrowly defeated in his bid for a third term, lost ground in the 35 most populous counties in the state, but he gained ground in 16 of the 20 least populous counties.

Given the closeness of the results in the governor’s race, that analysis suggests Trump can still win states like Wisconsin by running up his margins in rural areas. It is the strategy he likely will pursue in 2020 as he seeks to hold onto the states that delivered the presidency for him.