A wave of Democratic victories ignited a ferocious debate across the Republican Party on Wednesday over whether President Trump’s un­or­tho­dox behavior and polarizing agenda are jeopardizing the GOP’s firm grip on power in Congress, governors’ mansions and state legislatures.

The recriminations sparked by Tuesday’s results — a decisive rebuke of Trump and his policies in Virginia and elsewhere — threatened the fragile GOP push to pass sweeping tax cuts by the end of the year and raised deeper questions about Republican identity and fealty to a historically unpopular president.

A year ahead of the 2018 midterm elections, Republicans are increasingly uncertain about keeping their majorities on Capitol Hill and are worried about how damaging Trump’s jagged brand of politics may become to the party.

“Donald Trump is an anchor for the GOP,” said veteran party strategist Mike Murphy, a Trump critic. “We got that message in loud volume in Virginia. The ­canary in the coal mine didn’t just pass out; its head exploded.”

The unease was palpable among vulnerable lawmakers, especially in suburban districts with the kind of voters who roundly rejected Ed Gillespie in Virginia. The Republican gubernatorial nominee ran on countering gang crime and illegal immigration and protecting Confederate history — cultural issues that Trump has made a touchstone of his presidency — but lost to ­Democrat Ralph Northam, 54 percent to 45 percent.

“Establishment Republicans are blaming Trump and talking about Armageddon, but what is their alternative?” one Republican strategist asked. (Jabin Botsford/The Washington Post)

Ohio Gov. John Kasich (R) said Tuesday’s contests were a lesson to Republicans that catering to the party’s conservative base with hard-line appeals and incendiary language turns off the moderate voters they need to win in states like his own. He said his party must choose between a political message of “blaming and scapegoating” or a more hopeful pitch centered around everyday issues such as health care and the economy.

“This is a repudiation of the politics of narrow,” Kasich said. In an apparent reference to Trump’s 2016 victory, the governor added, “The politics of anger may work for a moment in time, but it does not last, thank goodness.”

But other party leaders warned against drawing overly broad conclusions about Trump and his political strength from defeats in a handful of states — including two, Virginia and New Jersey, that Democrat Hillary Clinton won in last year’s presidential election.

“Democrats say this is a repudiation and this is an anti-Trump vote, but to me the case doesn’t stick,” said Robin Hayes, chairman of the North Carolina Republican Party. “Donald Trump is extremely popular in a lot of places. His promise to ‘drain the swamp’ resonated and still does.”

Said Gov. Bill Haslam (R-Tenn.): “When you see one night of elections, you see one night of elections. There is always natural wind at your back if you’re not in the White House, and wind in your face if you are.”

Still, even among Trump’s allies, there were complaints about the White House being dis­engaged and unready to deal with the party’s mounting challenges.

State Rep. Scott W. Taylor (R – Va) said that the “divisive rhetoric” from President Trump helped contribute to Democrats’ victory in the Virginia election on Nov. 7. (Dalton Bennett/The Washington Post)

“The White House isn’t paying attention to the suburbs, and there has never really been a political operation there,” said Edward J. Rollins, the strategist for the Great America Alliance super PAC, a pro-Trump group. “They have to develop a strategy where it’s not just Trump alone winning, where the whole party is able to win.”

Andy Surabian, an adviser to the group and an associate of former White House chief strategist Stephen K. Bannon, said blame cast upon Trump and Bannon for lurching the GOP to the right was misplaced.

“Establishment Republicans are blaming Trump and talking about Armageddon, but what is their alternative?” Surabian asked.

White House officials defended Trump’s efforts to help fellow Republicans, noting that he has held numerous fundraisers and other events to help the party. And they argued that the best way for incumbents to navigate the political turbulence would be enacting tax cuts and other Trump policies.

“The American people expect Republican majorities to deliver on their promises of boosting our economy, cutting taxes and repealing the disastrous Obamacare law,” said Raj Shah, a White House spokesman. “Nothing would help the political standing of Republicans in Congress more than delivering on the president’s agenda.”

Trump’s friends at the Capitol said the divisions are more about style than substance. “The difficulty is, we have a president who didn’t come from the Washington structure, so it’s really hard for people inside the structure or outside the structure to evaluate him,” Sen. David Perdue (R-Ga.) said.

The fresh discord comes after weeks of escalating tensions inside the GOP. Three prominent Republican senators — John McCain and Jeff Flake of Arizona and Bob Corker of Tennessee — have publicly condemned Trump’s leadership and questioned his fitness for office.