Supporters of President Trump cheer as he arrives to speak at a campaign rally on Oct. 10 in Erie, Pa. Trump’s visit in the closing weeks to a district near Erie was seen by Democrats as a key boost for Rep. Mike Kelly (R-Pa.), who won reelection over a moderate Democratic challenger. (Evan Vucci/AP)

As the final votes from the midterm elections rolled in last week, it became clear that President Trump’s near-constant campaign presence helped transform the American political map — effectively erasing lighter shades of red and blue.

The Trump effect now sets the stage for an intensely tribal 2020 showdown over his reelection, with a smaller and heavily rural Republican Party facing off against a growing Democratic coalition of suburban and urban residents in higher-income states.

This dynamic will play out as Trump inevitably remains the dominant issue in nearly every facet of American politics, at once electrifying and polarizing, and constantly needling his friends and foes to react to his unpredictable moves and blistering Twitter feed.

“Trump just overwhelms and takes all of the oxygen out of the room, and it’s all focused on him,” said Sen. Jeff Flake (R-Ariz.), a critic of the president who declined to run for reelection.

“Republican primary voters, that subset of a subset, that’s Trump’s party,” he continued. “It’ll continue to be like this and be exaggerated in 2020 because they’ll draw even more turnout on the other side.”

Trump’s influence over the midterms was apparent almost immediately after he took over the electoral spotlight within the final month with a barrage of rallies laced with anti-immigrant rhetoric and falsehoods. Voters who had been absent all cycle suddenly tuned in with interest.

Republicans in rural parts of Kentucky, Georgia and Tennessee were newly excited about the election, according to Democratic polling in those races, increasingly favorable toward the president and cheered by the recent confirmation of Supreme Court Justice Brett M. Kavanaugh. In suburban, wealthier parts of the country such as Northern Virginia, the opposite was happening, as moderates recoiled.

“Same president, same message,” said Democratic pollster Fred Yang, who was working for candidates in rural and suburban areas. “He sort of polarized the choices.”

Strategists from both parties say the president, in effect, erected a wall that broke the blue wave, allowing Republicans to hold on to key House seats and defeat Democratic Senate incumbents in conservative Missouri, Indiana and North Dakota. The same strategy, however, empowered Democrats to win decisive victories in formerly Republican suburbs in New Jersey, New York, Pennsylvania, California and otherwise reliably red Texas.

“If I didn’t do those stops, we would definitely not have control of the Senate,” Trump boasted in an interview last week with the Daily Caller, a conservative website. “Nobody has ever had a greater impact.”

Trump emerged in firm control of a Republican Party with an expanded majority in the U.S. Senate and a viable path to reelection, if he can hold on to his past support in Florida and the industrial Midwestern states that nonetheless elected Democrats statewide this year.

But that is little consolation for the parts of his party that were sacrificed in the process.

“It was very difficult to try to make a case — particularly to suburban, college-educated women who were so upset with the president — to vote for me when they felt there needed to be a greater check on his power,” said Rep. Mike Coffman (R-Colo.), who lost his suburban Denver district by more than 11 points after winning by eight points in 2016.

What was bad for Republicans in tony professional neighborhoods was good for the party in more rural parts of the country. Trump’s visit in the closing weeks to a district near Erie, Pa., for example, was seen by Democrats as a key boost for Rep. Mike Kelly (R-Pa.), who won reelection over a moderate Democratic challenger.

“What was made clear by this election is that Trump’s supporters in places like this are going to continue to support him because they feel they have been left behind,” said Tony Coppola, who managed Ron DiNicola’s losing campaign in that district.

Assessing the on-the-ground impact of Trump’s personal appearances is difficult.

Two 11th-hour rallies in conservative bastions of southwest Florida and the Panhandle appear to have helped pull Gov.-elect Ron DeSantis and Sen.-elect Rick Scott across the finish line. But appearances in West Virginia and Montana were not enough to topple the Democratic incumbents in those heavily pro-Trump states.

And political strategists in both parties say Trump’s rhetoric, particularly concerning the refu­gee caravan, contributed to GOP defeats in Nevada and Arizona.

These limits are likely to constrain the party going forward.

“The states where we saw the most success with the rallies were states where he won by 20 points or 30 points or 40 points,” said Sen. Cory Gardner (R-Colo.) who oversaw the GOP’s Senate effort this cycle and is expected to face a difficult reelection race in 2020.

One clear example of the dynamic came in rural Kentucky, where Democrat Amy McGrath, a well-funded former Marine pilot, tried to run beyond her party’s national brand among voters, in part by opening 19 field offices in the district.

At a rally there in October, Trump criticized her, calling McGrath an “extreme liberal, chosen by Nancy Pelosi, Maxine Waters — that’s a real beauty — and the angry Democrat mob” — even though McGrath had defeated another candidate favored by the Democratic Party in the primary.

The final internal McGrath campaign poll showed Trump’s approval increasing in the district over the course of October, along with the share of the electorate who considered the confirmation of Kavanaugh important. On Election Day, McGrath’s Republican opponent, Rep. Garland “Andy” Barr, posted better numbers in the rural southeastern parts of the state than McGrath’s team had expected, Yang said.

That rural turnout matched by Democratic enthusiasm in cities and suburbs drove nationwide voting to the highest levels for midterm elections since 1914, before women were guaranteed a right to vote under the 19th Amendment, according to Michael McDonald, a professor at the University of Florida who studies historical voting patterns.

“The major story is that Trump has clearly created an engaged electorate,” he said. “As I look forward to what is going to happen in 2020, unless conditions change, we are probably looking at one of the highest-turnout elections in our nation’s history.”

While Trump was able to galvanize his base, Trump’s effect on his opponents was even more pronounced nationally. A voter file analysis by the left-leaning firm Catalist shows that the same anti-Trump enthusiasm that led to a massive Democratic fundraising advantage and strong candidate recruitment, also showed up at the polls, with the overall share of nonwhite voters rising about three points this cycle compared with 2014.

Network exit polls gathered from CNN found shifts in how key parts of the electorate voted compared with 2016. Nearly 6 in 10 white, college-educated women voted for a Democratic House candidate, an eight-point increase from the 51 percent that supported Hillary Clinton in 2016. Young people also moved, with 67 percent of voters under age 30 supporting a Democrat in the House, compared with 55 percent who supported Clinton.

Joel Benenson, the pollster for both of President Barack Obama’s national campaigns, said the election results call to mind the old political maxim that a politician’s greatest strength can also be a weakness, with a backlash growing against the very attributes that allowed Trump to win in 2016.

“You have to realize that Trump may be punching himself out,” Benenson said.

There were regional shifts, as well, that could affect the 2020 landscape. Republicans performed much worse in states along the southwest border and in western states such as Montana and Colorado.

“In the places we lost, he remains enormously popular. But there are fewer of those places now,” said Sen. Brian Schatz (D-Hawaii).

In Colorado, a historic number of voters unaffiliated with either of the main political parties turned in ballots. Of that group, which was larger than the number of Republican or Democratic voters, the overwhelming majority voted Democratic, according to a post-election poll by Magellan Strategies, a Republican firm.

Fewer than 1 in 4 unaffiliated voters in the state said they expected to support Trump in the 2020 election.

In Georgia, the diverging energies of voters showed up in the contrast between statewide results and the fortunes of suburban Republicans in Congress. Rep. Karen Handel (R) lost the suburban seat she had won in a special election in 2017. Democrat Carolyn Bourdeaux is seeking a recount in her race against Rep. Rob Woodall (R), who won by less than 0.5 percent in his district outside Atlanta. Two years earlier, he had won by 20 points. At the same time, Republican Brian Kemp won the gubernatorial race behind strong support from the state’s rural areas.

Sen. David Perdue (R-Ga.), a Trump ally, defended the president and said the Democrats deserve more credit for how they ran campaigns, including in Georgia, where Handel was defeated in the Atlanta suburbs.

“I don’t think Republicans did a good enough job of telling America what the reality really is,” Perdue said. “Health care was a bigger issue in the suburbs than President Trump.”

Among many congressional Republicans, the election aftermath brought a bleak and rattled aura as they grappled with the loss of the House majority and the seemingly unmovable presence of Trump in their political lives and fortunes.

Rep. Steve Stivers (R-Ohio), who served as chairman of the National Republican Congressional Committee this year, offered only a few vague statements when asked whether Trump was a boost or burden for his party.

“I’m not focused on looking backward, I’m looking forward,” Stivers said.

When asked whether Trump will lift the GOP in the suburbs in the run-up to the 2020 elections, Stivers demurred again.

“He’s the president, and I think he’s going to be the president,” he said.

Stivers was then asked whether he was implying that the answer to the question “is not ‘yes.’ ”

“It’s not a ‘no,’ ” he said with a slight chuckle as he quickly walked away.