Democrats’ claim of victory Tuesday in Kentucky’s gubernatorial race, as well as the Democratic takeover of the Virginia state legislature, left Republicans stumbling and increasingly uncertain about their own political fates next year tied to an embattled and unpopular president.

Many allies of President Trump rushed to explain away the poor performance of incumbent Kentucky Gov. Matt Bevin (R) as an anomaly, while other GOP veterans expressed alarm about the party’s failure in a state where Trump won by nearly 30 percentage points in 2016 — and where he just campaigned this week.

Although Bevin was controversial and widely disliked, he was also a devotee of the president, embracing Trump’s agenda and his anti-establishment persona. And in the contest’s final days, Bevin sought to cast his candidacy as a bulwark against House Democrats’ impeachment inquiry of Trump.

But Bevin’s attempt to nationalize his cause by stoking conservative grievances about the impeachment process was not enough to overcome his problems, nor was Trump’s raucous rally for the governor on Monday — raising questions about Trump’s political strength as he faces a barrage of challenges and a difficult path to reelection.

The outcome — with Democrat Andy Beshear claiming victory with a lead of several thousand votes and Bevin refusing to concede — underscored how Republicans are struggling to navigate choppy political waters as the 2020 campaign now begins in earnest. Trump continues to dominate the party, but many lawmakers are uneasy about their ability to defend his conduct and hold on to suburban support.

Yet few Republicans are willing to even lightly criticize Trump because they widely believe they will need his voters’ backing and enthusiasm to survive next year.

Still, the Kentucky defeat has sparked concern among the party’s donors and many longtime GOP leaders who are worried that the nonstop twists of the House impeachment inquiry and Trump’s growing fury are making it increasingly difficult for Republicans to make a clear and compelling case to voters.

With a year to go until polling day, Washington Post reporters Matt Vizer and Toluse Olorunnipa talk through what matters most in the next 12 months. (Zach Purser Brown/The Washington Post)

Democratic successes Tuesday in the vote-rich suburbs of Philadelphia were also cited as another example of Republican trouble in Pennsylvania, which Trump won in 2016. In the critical Delaware County suburbs, Democrats held on to all five seats on the county council and the party also did well in local races in nearby Bucks County.

“Taking a step back from KY and looking at all the elections last night, GOP should be most concerned about what happened in local elections in Chester, Delaware and Bucks County, PA,” Josh Holmes, a McConnell confidant and political strategist, tweeted. “That is genuinely alarming if you know the voting history.”

Former Pennsylvania congressman Ryan Costello, a moderate Republican from the Philadelphia suburbs, said “there appears to be an electoral realignment in the suburbs” and warned Republicans to take notice.

“Republicans aren’t leaning in on the issues that affect suburban, affluent voters like gun safety and the environment,” Costello said. “Plus, Trump is not a benefit but a burden. That forces Republicans to have to ask voters to really hear them out on issues like taxes and school safety even if those voters don’t like Trump and that’s not easy.”

“It was a rough night,” said Scott Reed, the chief political strategist for the U.S. Chamber of Commerce. “The Republican Party is lacking message discipline, and that needs to be addressed. There is a lot of positive news around President Trump’s governing on the economy, on regulations and judges, and it seems to be overwhelmed by the drama.”

“It’s a definite shot across the bow, even though Republicans picked up the state attorney general position in Kentucky,” said former Republican National Committee chairman Michael Steele, referring to Republican Daniel Cameron, who became the first African American to win that office. “But losing the governorship is a smack at both Mitch McConnell and the president, sending up a cautionary note.”

Steele added, “Just because Trump shows up doesn’t mean an automatic win anymore.”

Allies of McConnell, the Senate majority leader, argued that Bevin’s loss did not indicate any looming trouble for him, who is up for reelection in 2020 and is working to hold the Senate GOP together amid the impeachment debate.

“Republicans won every office on the ballot except [Bevin’s],” Scott Jennings, a longtime McConnell adviser, tweeted. “Some unique candidate problems. GOP brand was fine elsewhere.”

Early Tuesday morning, Trump tweeted, “Based on the Kentucky results, [McConnell] will win BIG in Kentucky next year!”

Some Republicans, however, also viewed Beshear’s appeals to moderation as a sign that Republicans cannot take red-state races for granted.

Instead of drifting to the left, the son of former governor Steve Beshear railed against Bevin’s divisive style and his attempts to slow the expansion of Medicaid under former president Barack Obama’s health-care law.

“Republicans look at that and say, ‘Anything could be competitive if the Democrats are going to be on their games like they were with Beshear here,’ ” said former Pennsylvania senator Rick Santorum (R). “You’re seeing Democrats building on what they did in 2018, running more moderate candidates and making sure those candidates are financed.”

In a statement, Democratic Governors Association Chair Gina Raimondo congratulated Andy Beshear.

“Governor-Elect Andy Beshear will restore decency to Frankfort and has spent his career lifting up every single Kentuckian,” she said. “Tonight’s victory is a major pickup for Democrats and a massive rejection of Bevin’s record of stoking chaos, undermining public education, and trying to gut health care coverage.”

On Monday night — less than 12 hours before the polls opened — Trump appeared at a rally in Lexington, Ky., to support Bevin but also made sure the crowd knew his own reputation was on the line.

“If you lose, they will say Trump suffered the greatest defeat in the history of the world,” said Trump, pointing at a bank of news cameras. “You can’t let that happen to me, and you can’t let that happen to your incredible state.”

Trump’s campaigning fared better in deep-red Mississippi, where Lt. Gov. Tate Reeves (R) defeated Democratic attorney general Jim Hood on Tuesday in that state’s governor’s race.

Sen. Roger Wicker (R-Miss.) said in an interview prior to the race being called that campaigns in the Deep South, including the Mississippi gubernatorial contest, have drawn attention because both parties are giving them serious attention and fielding candidates with the ability to win statewide.

In late 2017, Sen. Doug Jones (D-Ala.) won a special election for U.S. Senate, giving Democrats hope of a comeback in similar states.

“We had two statewide officials running against each other and we haven’t had that in years,” Wicker said. He dismissed the suggestion that Trump’s standing could diminish. “If this race was about Trump, it’d be a 60-40 race” in Republicans’ favor.

When asked if Democrats are figuring out ways to do better in the South, Jones said earlier Tuesday: “We’re doing that, that’s pretty obvious with the way things are going. Democrats speak to voters in the South more than they have in the last two generations.”

The gubernatorial races in Kentucky and Mississippi came one year after Democrats made major inroads in statehouses, including flipping seven governorships and more than 400 state legislative seats. Many of those gains were in Midwestern or coastal states that formed the backbone of the backlash to Trump in the 2018 midterm elections. Louisiana also holds a runoff election Nov. 16 to decide the governor’s race there.

In 2016, Trump carried Kentucky by about 30 points, Louisiana by about 20 points and Mississippi by about 17 points.

Sen. John Cornyn (R-Tex.), reflecting the views of several Senate Republicans on Tuesday, said he did not see Kentucky as a bellwether for 2020 even if the president was making it sound that way during his remarks at Monday’s rally.

“It’s not a national race except in the sense the president wants to make it about him,” Cornyn said. “Nobody likes to lose, but I wouldn’t call it a bellwether for 2020. Look, if the Democrats elect Elizabeth Warren as their nominee, I think it’s going to come at a price for them.”

“Bevin’s got his own problems,” Cornyn said. “That’s unrelated to national politics.”

Tim Craig and Matt Viser contributed to this report.