WASHINGTON — U.S. President Donald Trump stood before thousands of his supporters in Kentucky on Monday night and told them that if the state’s Republican governor, Matt Bevin, were to lose the following day, the loss would inflict political damage on Trump himself. “If you lose it sends a really bad message. … They are going to say Trump suffered the greatest defeat in the history of the world! You can’t let that happen to me,” Trump said at his rally in Lexington.

Haaretz Weekly Ep. 47 0:00 -- : -- 15 Skip 15 seconds backwards Play audio 15 Skip 15 seconds ahead 1 X Change playback rate from 1 to 1 Mute audio

In a stunning upset Tuesday, Kentucky rejected Bevin and chose as its new governor Andy Beshear — a Democrat who was previously the state’s attorney general. Beshear won by less than 1 percentage point (about 5,100 votes) in a state where Trump triumphed in the 2016 election by a margin of almost 30 percent. Bevin refused to concede on Tuesday night, although there is no provision for an automatic recount under Kentucky law and it is unclear what action he is planning to take in order to contest the result.

Kentucky’s gubernatorial race was one of several statewide elections that took place Tuesday, almost exactly a year before the 2020 presidential election.

Another key political battleground was Virginia, where both houses of the Virginia state legislature stood for reelection. The Democratic Party won, gaining full control of Virginia’s state government for the first time in a generation. Attempts by Trump and Vice President Mike Pence to sway the election toward the Republican Party ended in failure.

One election that did end in a Republican victory was the gubernatorial contest in Mississippi, where Republican candidate Tate Reeves defeated his Democratic rival Jim Hood (the state’s current attorney general). Trump campaigned for Reeves in Mississippi over the weekend. The result, however, is likely to be much closer than Trump’s victory over Hillary Clinton in the state in 2016, when he won by a margin of almost 18 percent.

In both Kentucky and Virginia, the main Democratic gains were in suburban areas that for decades were seen as Republican strongholds. In Kentucky, a major part of Beshear’s surprise victory was his strength in the suburbs of Lexington (the state’s second largest city), as well as in suburban areas in northern Kentucky that border Cincinnati in neighboring Ohio.

In Virginia, Democrats won big in the suburbs of Washington and the state capital, Richmond. The results were reminiscent of the 2018 midterm elections, when the Democrats flipped three Republican congressional districts in suburban areas.

Virginia has undergone a political transformation over the past decade, ever since it elected Barack Obama in 2008 — the first time a Democratic presidential nominee had won the state since 1964. In 2017, Democrat Ralph Northam became the state’s governor, winning by a 9 percent margin in a race that many pundits saw as a predictor of the subsequent “blue wave” in the midterms a year later.

In the days leading up to Tuesday’s elections, Trump specifically endorsed one Republican candidate in a suburban part of northern Virginia: “Great Republican Geary Higgins has my complete and total Endorsement for Virginia Senate, 13th District,” Trump tweeted on Monday. “He is strong on Crime, the Border, our Military, Cutting Taxes, and protecting your 2nd Amendment. ... Vote for Geary Higgins.” Trump also warned that Higgins’ Democratic rival, John Bell, “will take your guns & raise your taxes.”

Gun safety was a major issue all across Virginia on Election Day: Because the Republicans previously held a narrow majority in both the state Senate and state House of Delegates, they were able to block gun control legislation promoted by the Democrats. The issue became the focus of the election for many voters following a mass shooting in Virginia Beach last May that left 12 people dead.

Voters at two polling stations in the 13th District who spoke with Haaretz on Tuesday all mentioned gun control as a main motivation behind their ballot. “We need to have better gun laws in this state, and that’s something the Republican Party refuses to admit,” said Roberta, a lawyer in her fifties who had stopped at the polling station on her way back from work. “This used to be a Republican district, but the Republican Party has become too extreme for many people here. I have friends who are lifelong Republicans, but they are voting for the Democratic candidates this time mostly because of the guns issue,” she added.

A large number of the district’s residents are government workers who commute into Washington daily. “Trump has been terrible for people who work in the government; he despises us and is threatening to shut down our workplace every few months,” said a voter who works in a federal agency and gave only his first name, Mark. “This area has been trending blue for years, but I don’t understand what Trump thought he was doing when he endorsed the Republican candidate here. People don’t like Trump around here; his endorsement only helps the Democrats,” said Mark.

John Edsall, a voter in his forties, told Haaretz that he did not regularly vote in non-presidential elections before Trump’s election in 2016. That changed in 2017 when he cast a ballot in the Virginia gubernatorial race. He came to vote again on Tuesday. “If there is one good thing that has come out of the Trump presidency, it’s that people are becoming more involved in local politics,” said Edsall. “I’m paying much more attention than ever before.”

Bell ultimately took the 13th District by a 9 percent winning margin. Overall, Democrats took control of the Virginia state Senate after winning 21 of the 40 seats, and enjoyed an even larger victory in the House of Delegates, winning at least 54 of the 100 seats.

The Virginia House of Delegates is the oldest elected legislative body in the United States (as part of the General Assembly) and, following the Democrats’ victory, looks set to have its first-ever female House speaker. The leading candidate is Eileen Filler-Corn, who would also become the state’s first Jewish-American House speaker.