The Kentucky race was one of two red state governorships Republicans fought to defend on Tuesday. In Mississippi, GOP Lt. Gov. Tate Reeves brushed off a challenge from state Attorney General Jim Hood, keeping the seat in Republican hands with Gov. Phil Bryant retiring after serving two terms. Trump tweeted afterward: “Our big Rally on Friday night moved the numbers from a tie to a big WIN. Great reaction under pressure Tate!”

Trump decided to go all-in on the Kentucky, Louisiana and Mississippi governor’s races this fall, gambling that a clean sweep across the three conservative states would allow him to reclaim his political footing at the most perilous moment of his presidency. The president took a personal interest in the three contests and quizzed aides on how they were shaping up. He spoke regularly by phone with Bevin, a close ally.

Trump’s political operation, meanwhile, spent millions on a get-out-the-vote effort across the three states.

But Republicans pushed back on the idea that Bevin’s apparent loss was a bad omen for the president. They noted that Bevin was deeply unpopular for much of his four-year term and had trailed Beshear throughout much of the race. They also noted that Republicans swept the other statewide contests on the Kentucky ballot, with each candidate performing significantly stronger than Bevin.

“There’s really no extrapolating. It’s important to remember that Matt Bevin was one of the least popular governors in the country and started the race down nearly 20 points. That’s why we saw every other statewide Republican win, while Bevin came up just short” in the unofficial vote count, said Phil Cox, a former Republican Governors Association executive director.

Trump campaign manager Brad Parscale said in a statement, “The president just about dragged Gov. Matt Bevin across the finish line, helping him run stronger than expected in what turned into a very close race at the end. A final outcome remains to be seen.”

Beshear's performance was driven by wide margins in and around the cities of Lexington and Louisville, while Bevin romped through many of the state’s rural counties. Beshear hewed closely to a red state Democratic playbook. He focused his campaign on state and local issues: increasing investments in public education, expanded access to health care and protecting state pensions.

But another major theme was Bevin’s abrasive personality and penchant for controversy that contributed to his poor poll numbers. He said he intentionally infected each of his nine children with chicken pox, rather than have them vaccinated. He blamed the accidental shooting of a 7-year-old girl on organized teacher sick-outs.

Still, with just a year until the election, the Kentucky outcome is bound to revive fears within the GOP that the president’s unpopularity is taking a toll on the party’s candidates. Trump became a central figure in the contest and a frequent presence in Bevin’s television advertising, in addition to ads from GOP outside groups.

Meanwhile, Democrats flipped both chambers of the Virginia Legislature, according to The Associated Press, securing total control of state government there for the first time in over a quarter-century. The Democratic victories clear the way for new legislation addressing party priorities from stricter gun laws to expanded health care — and, crucially, put Democrats in full control of the post-2020 redistricting process in the state.

The apparent Kentucky result will intensify interest in next week’s Louisiana gubernatorial runoff. Trump visited the state several weeks ago, and he’s heading there again on Wednesday to rally for Republican candidate Eddie Rispone. Polls there show a close race.

While failing to defend Bevin, Republicans picked off other statewide offices down ballot in Kentucky. With Beshear running for governor, Republican Daniel Cameron, a former Mitch McConnell staffer seeking the attorney general post, easily outran Bevin.

In Mississippi, Democrats mounted their strongest challenge since losing the governor’s mansion in 2003. Hood, who has served as the state’s top law-enforcement officer for 16 years, has built a reputation as a conservative, law-and-order Democrat out of step with the liberal wing of his party.

But in a state where voting is sharply polarized along racial lines and Trump won by 18 points in 2016, Reeves was the favorite. Trump traveled to the state last week with the lieutenant governor and said it was “embarrassing” that Republicans hadn’t put the contest away.

“I can’t believe this is a competitive race,” said Trump.

The battle for Virginia’s General Assembly, meanwhile, drew millions in outside spending , especially from Democrats eager to improve their fortunes in state legislatures ahead of the 2020 redistricting cycle.

The elections there cap off a tumultuous two years for Virginia Democrats. The party won governor’s mansion in 2017 and flipped 15 GOP-held state House seats, but fell short of capturing the lower chamber when Republicans won a random drawing after the candidates in one district were precisely tied in the vote count.

Just months later, the state’s top three Democratic leaders — Gov. Ralph Northam, Lt. Gov. Justin Fairfax and state Attorney General Mark Herring — were ensnared in a series of scandals involving allegations of blackface and sexual assault.

Zach Montellaro contributed to this report.

