RICHMOND, Va. — The Democratic Party’s sweeping victory in Virginia on Tuesday put a major scare into Republicans in Congress and signaled the severe damage President Trump's unpopularity could cause in 2018.

Ed Gillespie, the Republican nominee for governor, didn’t just lose. Lt. Gov. Ralph Northam, the Democrat, trounced him by nearly 9 percentage points, lifting several Democratic challengers to victory over GOP incumbents in down ballot legislative races.

Trump blamed Gillespie, charging on Twitter that he lost because he did not embrace him or his populism. Indeed, Gillespie kept Trump at arm's length, never campaigning with him, although his advertising aped the president’s culture war themes.

But Republicans who gathered here for a hoped-for Gillespie victory party said the defeat belonged to Trump and his historically low approval ratings — and to a Republican Congress that has accomplished little since the party assumed full control of government in January.

“This should be a wakeup call,” Rep. Scott Taylor, R-Va., said. “The Democrats had a very high turnout this election, and I think that’s a direct reflection of the administration.”

“Leaders lead people together and work for addition as opposed to subtraction,” Taylor added. “There has to be some self-reflection.”

Northam led Gillespie 53.9 percent to 45 percent in a race that was called less than two hours after the polls closed. The Democratic candidates for lieutenant governor and attorney general also won easily.

Meanwhile, the Democrats needed to pick up 17 seats to win control of the Virginia House of Delegates and were on track to win more than a dozen, boosted by a ticket that won more votes than expected in the suburbs, long a part of the Republican coalition and where the GOP needs to do well in 2018 to hold the House.

A Republican strategist who advised Gillespie faulted Trump for the shellacking, arguing that when you have a president whose job approval is below 40 percent — “who is that big of a drag, you’re not going to win.” But this Republican, and other GOP consultants unaffiliated with the Gillespie campaign, said that the party’s majorities in the House and Senate were also, to a degree, responsible.

Their effort to repeal and replace Obamacare hit the skids over the summer and the outcome of tax reform, finally underway, is unknown. Republican insiders said the party is in danger of suffering losses in the midterms like it did in Virginia if the tax overhaul fails.

“This should be a wake-up call for Republicans in Congress that our members and candidates need things to run on. We have to pass tax reform. Period,” said a senior Republican strategist involved in House races.

In retrospect, Republicans say, Trump's focus on culture war memes, such as demanding that the National Football League bench players who kneel during the National Anthem to protest racial injustice, as well as Gillespie advertising that stoked cultural anxieties, overshadowed the president's economic message, and Gillespie's personal focus on the issues.

It cost Republicans in Virginia, in the New Jersey governor's race, and other down-ballot races across the country where Democrats performed well.

“Win on economics, not culture,” Republican consultant Bruce Haynes said. “Trump didn’t win on statues and gangs, he won on jobs.”

Vehement opposition to Trump motivated a wave-like Democratic turnout in Virginia, with swing suburban counties near Washington, D.C., that have been friendly territory for Republicans voting for Northam by double-digits.

That, and the possible Democratic takeover of the House of Delegates, was fresh evidence that energized opposition to Trump could cost Republicans control of the House next year, and stem expected Democratic losses in the Senate.

Much can change in a year. Republicans won in a wave in 2014, former President Barack Obama's second midterm, one year after the ill-fated government shutdown over opposition to Obamacare sank the party to its lowest approval rating in a generation.

But in the near term, GOP operatives warned that the Democrats would use Virginia to pad their fundraising and convince top recruits to run join the 2018 campaign. Congressional Republicans, too, were likely to make adjustments.

Trump until now has only been a potential threat to their re-election, as have their own legislative stumbles. Republicans won a spate of special elections to fill House vacancies earlier this year, including a few in competitive districts that Democrats spent millions to flip.

Now those threats are very real, and Republicans could react accordingly.

"As long as Trump’s approval rating is at 40 percent or less, we’re going to be facing significant headwinds," Republican strategist Alex Conant said. "The immediate response will be to redouble on passing tax reform — preferably something that appeals to middle class and independent voters. Long term, more members will reconsider their approach to Trump."