The midterm elections on Tuesday laid bare the growing chasm between urban and rural America, leaving Republicans deeply concerned about their declining fortunes in the metropolitan areas that extinguished their House majority and Democrats just as alarmed about their own struggles to win over voters in states that strengthened the G.O.P.’s grip on the Senate.

For both parties, the election represented an acceleration of dizzying realignment along cultural lines. Districts that once represented the beating heart of the Republican Party rejected President Trump’s avowed nationalism as a form of bigotry, while Democrats further retrenched from the agricultural and industrial communities where they once dominated.

Democrats took control of the House not merely by making gains in coastal states that supported Hillary Clinton, but also by penetrating deeply into suburban corners of traditionally conservative states in the South and across the Plains, like Georgia, Texas and Oklahoma. The House results made clear that the Trump-induced difficulties Republicans are suffering with once-reliable voters are hardly limited to blue states and could make it substantially harder for the president to remake his upscale-downscale coalition in 2020.

“The party should be concerned when you look at what was once one of its bases and see how increasingly vulnerable we are with them,” said Gov. Bill Haslam of Tennessee, an old-guard Republican who heads the Republican Governors Association, pointing to Democratic incursions into localities like Cobb County, Ga., that were once conservative bulwarks.

Mr. Haslam, whose party lost seven governorships but held onto the major prizes of Ohio and Florida, added, “I don’t think anybody can come away from last night claiming victory.”

Eric Cantor, the former House majority leader, said his fellow Republicans should be urgently concerned about the collapse of the longstanding political alliance between culturally conservative rural voters and high-income suburbanites who are focused on the economy and issues like education and child care.

Image

Embracing President Trump cost Republicans the House but strengthened their hand in the Senate.CreditTamir Kalifa for The New York Times

“We’ve been on a steady trend losing suburbanites, losing college-educated women, and it’s time for the Republican Party to adopt a suburban agenda,” Mr. Cantor said.

Mr. Cantor’s home state, Virginia, offered a stark example of the quickening march of cul-de-sac-dwelling professionals toward the Democratic Party. Democrats gained three House seats in the state, including Mr. Cantor’s old district, on the strength of these voters. Republicans faced a humiliating loss in Virginia’s election for the Senate, after a Trump-style racial provocateur won the party’s nomination.

The most optimistic Democrats regarded the list of House victories as a road map to a grander national restoration in the 2020 presidential election. Mayor Rahm Emanuel of Chicago, in an interview, also held up Democratic wins for governorships in New Mexico, Colorado, Nevada, Michigan and Wisconsin to argue that the party’s path back to 270 Electoral College votes had come into focus on Tuesday.

“Look at the Southwest and Midwest — in a presidential, that’s what we’re going to need,” Mr. Emanuel said.

Beyond the House, Democrats also notched major statehouse gains, capturing six new legislative chambers and securing supermajorities in six others.

But not all Democrats were ebullient in Tuesday’s aftermath. Former Gov. Tom Vilsack of Iowa, who served as agriculture secretary in the Obama administration, complained bitterly about his party’s worsening struggles with rural voters.

“It’s so frustrating,” said Mr. Vilsack, who has been pleading with Democrats to aggressively court the Farm Belt. “You pick out the interest group that’s part of our base and we always have a message for all of those folks, but we don’t do the same thing for folks in rural places.”

Image

Supporters of Abigail Spanberger, a Democrat who flipped a House seat in Virginia’s Seventh District, celebrated her win on Tuesday.CreditErin Schaff for The New York Times

Mr. Trump insisted in a rollicking and often hostile news conference on Wednesday that he was not at all concerned about his new political fragility, claiming his party enjoyed a “great victory” on Tuesday. He boasted that in the races he cared about most — in the states he frequented most in the campaign’s final days — Republicans largely won.

And win they did. For Democrats like Senator Claire McCaskill, a Missouri moderate, the rightward shift of rural America coincided with her own party’s tilt to the left, with fatal consequences. A political survivor who repeatedly escaped defeat over a decades-long career, Ms. McCaskill lost her bid for re-election on Tuesday to Josh Hawley, a Republican who happily parroted Mr. Trump and made the nomination of Justice Brett M. Kavanaugh the centerpiece of his campaign.

“The further you get from metropolitan areas, the more powerful Donald Trump is and the more allegiance there is to whatever he says and does,” said Ms. McCaskill, who only 12 years ago won her seat in the Senate by carrying a number of rural counties.

Ms. McCaskill was not the only Democrat felled by Mr. Trump’s second-city barnstorming. Her Senate colleagues Joe Donnelly of Indiana and Heidi Heitkamp of North Dakota were also swept out of office, and a number of their colleagues won by far closer margins than was expected.

In every case, the results came about for the same reasons: Working-class white voters abandoned their ancestral party. For the Democrats, the power of incumbency and a fund-raising advantage meant little against the strength of this underlying cultural change.

In states like hers, Ms. McCaskill said the president’s inflammatory appeals to division and fear were ubiquitous, in large part because of Fox News. She recounted walking into restaurants in every corner of Missouri and invariably seeing the channel airing footage of the Central American caravans Mr. Trump demonized.

“It’s time we all quit dancing around what is now a state-owned news channel,” she said.

Mindful of her party’s delicate position, Ms. McCaskill said she was also concerned about the implications of a divided capital.

Image

Rural voters in Missouri delivered a win for Josh Hawley, a Republican who defeated Senator Claire McCaskill on Tuesday.CreditRyan Christopher Jones for The New York Times

“If this turns into, ‘the House investigates Trump and Trump turns the House into his foil,’ nothing is going to get done and that’s not going to help us,” she said.

Perhaps most ominous for Democrats on Tuesday were the election results in Florida — the only diverse and densely populated swing state in which Mr. Trump’s party appeared to win election for both Senate and governor.

To the shock of national Democratic leaders, Senator Bill Nelson was trailing Wednesday evening in a re-election battle against Gov. Rick Scott, while Andrew Gillum, the liberal mayor of Tallahassee, was defeated by Ron DeSantis in his bid for governor despite leading in most every poll during the general election.

Just as Mr. Trump did two years ago there, Mr. Scott and Mr. DeSantis rolled up wide margins in the state’s rural reaches and conservative-leaning retirement hubs, and won just enough Hispanic voters to offset their losses with African-Americans and suburbanites.

Those results reinforced for Democrats that there is a limit to the inroads they can make in historically Republican communities. And some of the Democratic lawmakers who were most essential to securing the House majority warned that the party could not take its gains in the suburbs for granted.

Representative Stephanie Murphy, a Democratic moderate from Florida, said the party would have to manage its House majority carefully in order to cement its emerging coalition. Having won a second term Tuesday in a purple district around Orlando, Ms. Murphy said the less-ideological voters who abound in districts like hers were open to electing Democrats they viewed as reasonable and public-minded.

Hey, I’m Alex Burns, a politics correspondent for The Times. Send me your questions using the NYT app. I’ll give you the latest intel from the campaign trail.

When the new Congress is sworn in, Ms. Murphy predicted, Democrats will not “veer as far left as the Republicans wanted voters to believe.”

“The party still needs to be a big-tent party that allows members to deliver for their constituencies,” Ms. Murphy said. “We now have a bunch of new members who are representing districts that are more purple and red than they are dark blue.”

A version of this article appears in print on , on Page F9 of the New York edition with the headline: A Political Realignment Without a Clear Winner. Order Reprints | Today’s Paper | Subscribe