The Republican Party thought it had a plan to win the governor's mansion in Virginia: Run a mainstream candidate who could nonetheless employ the racially charged culture-war rhetoric of President Trump to turn out a white working-class base.

A onetime establishment stalwart, Ed Gillespie, declined to campaign with Trump — but he executed the plan as well as he could. He defended Confederate memorials, vilified Central American gangs in ads that looked like horror movies and even denounced the kneeling protests of professional football players.

Then the voters voted, and Republicans went down in defeat across the state, from the top of the ticket to the bottom. A Democratic transgender candidate unseated a conservative in Prince William County. The Republican whip in the House of Delegates lost to a self-identified democratic socialist. And Republicans found themselves shut out of the top statewide offices, again.

The result is a bad omen for the Republican Party nationally, who will face head winds across the country in 2018, given continued frustration with political leaders in Washington and Trump's low approval rating. Without faith that Trump's base will match the enthusiasm of Democrats, many Republican candidates believe they will have to seek out a new political strategy to hold onto power.

"This is just an old-fashioned thumping," former Virginia GOP congressman Tom Davis said as the results came in. Urban voters, he said, came out in droves to send the Republican Party a message. "They have taken all of these guys out," Davis said of the state's denser districts. "The party is going to have to get right on immigration if they want to win in these areas."

In a tweet after the election, Trump, who is traveling in South Korea, tried to explain away Gillespie's loss by claiming that it did not reflect poorly on his own political potency.

"Ed Gillespie worked hard but did not embrace me or what I stand for," Trump wrote, before referencing recent special elections in Republican-leaning districts. "Don't forget, Republicans won 4 out of 4 House seats, and with the economy doing record numbers, we will continue to win, even bigger than before!"

But it was not clear that a further embrace would have produced any better results. Virginia, which has been trending blue in recent years, was the only Southern state won by Hillary Clinton in the 2016 election. She beat Trump by a margin of five points in 2016, compared with a nine-point margin for Democrat Ralph Northam over Gillespie.

Trump's tweets also glossed over the fact that the president had repeatedly praised Gillespie and his strategy while urging voters to turn out at the polls. "MS-13 and crime will be gone," Trump had tweeted to his supporters Tuesday morning. "Vote today, ASAP!"

In the short term, the defeat is likely to broaden a deepening divide between traditional Republicans, who have lost influence among grass-roots GOP voters, and the new populist conservatives who have embraced the polarizing approach of the president.

Before the election, Trump supporters were bullish on Gillespie's strategy, arguing that it showed the only path forward for mainstream Republicans looking to turn out the GOP base. "Where there are establishment candidates, the lesson of Gillespie is Trumpism without Trump," said Stephen K. Bannon, a former Trump aide and editor at Breitbart, who championed the strategy. "We now have forced the establishment to embrace our platform."

In the aftermath of defeat, some Republicans called for staying the course. Rep. Steve King (R-Iowa) argued that the solution for the Virginia Republicans' woes was running Corey Stewart, a former Trump campaign adviser who lost the primary to Gillespie, in the 2018 Senate campaign against Tim Kaine.

"Republicans need to say: 'We support President Trump's immigration policy and what he was inaugurated to do,'" said King. "Voters are not blaming the president for what's wrong in Washington. They're blaming these Never-Trumpers who form a coalition with Democrats."

But others said the results in Virginia proved that strategy would ultimately shrink the party's political power.

Rick Wilson, a Republican strategist who has vocally opposed Trump, claimed vindication after results across the country broke against Republicans. In Wilson's own backyard of Florida, a popular former Republican mayor of St. Petersburg went down in a surprise defeat — a result Wilson blamed on his waffling about Trump.

"Burn Donald Trump to the ground if you ever want to win another vote from a woman, a black person or a Latino," Wilson said. "Look at the exits and the composition of the electorate. We're getting slaughtered with women. We're getting slaughtered with minorities."

Former Republican Party chairman Michael Steele said the result reminded him of the 2006 election, when Republicans lost control of the House in a wave election amid low approval for President Bush. In that race, like this one, the president was a major factor, even if his name was not on the ballot.

"The lesson — and it's a very important one — is you cannot wrap your policy, or your philosophy, in one person. You've got to stand for something," Steele said.

That increases pressure on Republicans in Washington, Steele added, to deliver legislation, such as the proposed tax cuts.

"Republicans have to put something on the table. If it's tax reform, do tax reform. If it's infrastructure, do infrastructure," Steele said. "Let the president and his tweeting be the outlier."

Exit polls found Northam doing what few Democrats had achieved without Barack Obama on the ballot — reshaping the electorate. Just 67 percent of the electorate was white, according to exit polls, down from 70 percent in 2014. Forty-two percent of white voters backed Northam over Gillespie, up from the 35 percent who had backed Clinton over Trump.

The cultural issues that came to dominate Gillespie's ad campaign ended up breaking in Northam's favor. By an 18-point margin, voters said they preferred Confederate monuments to stay in place. But by a 16-point margin, voters said Northam would "handle race relations" better than Gillespie. Voters most concerned with health care, an issue that has bedeviled Democrats since the passage of the Affordable Care Act, picked Northam by 55 points.

Only 12 percent of voters said that immigration was their top issue. But among those voters, Gillespie was trusted by a 46-point margin to handle the issue better. Among the 15 percent who cited taxes as their top issue, Gillespie won by a 33-point margin, after a long ad campaign in which he promised to cut the state's income tax rate.

Democrats, meanwhile, expressed hope that Republicans would conclude that the divisive rhetoric employed by Gillespie was unproductive in future races.

"We haven't seen this kind of campaign since the 1960s," said Rep. Robert C. "Bobby" Scott (D-Va.), who represents the coastal communities of Norfolk, Hampton and Newport News. "Hopefully people will take notice and run campaigns they can be proud of, and not the kind of campaign that Mr. Trump ran and Mr. Gillespie ran."

One Republican strategist, Alex Castellanos, said after the results that he hoped the outcome would force the GOP to come up with a new approach to politics altogether, just as Democrats remade themselves in the early 1990s. "We are still the same hollowed-out party that Trump crushed," he said. "What Bill Clinton did for Democrats — the new Democrats — someone has to do for Republicans."

Michael SchererMichael Scherer is a national political reporter at The Washington Post. He was previously the Washington bureau chief for Time magazine, where he also served as the White House correspondent. Before joining Time, he was the Washington correspondent for Salon.com. Follow

David WeigelDavid Weigel is a national political correspondent covering Congress and grass-roots political movements. He is the author of "The Show That Never Ends," a history of progressive rock music. Follow