(Reuters) – Kentucky’s Republican governor, Matt Bevin, appeared poised on Tuesday to lose to Democratic challenger Andy Beshear, despite the state’s strong Republican leanings and an election-eve rally headlined by U.S. President Donald Trump. Beshear, 41, the state attorney general and son of former Democratic Governor Steve Beshear, led by more than 10,000 votes with 98 percent of precincts reporting in a state that Trump won by 30 percentage points in 2016. In a speech in Lexington, Kentucky, on Monday night, Trump told voters that they needed to re-elect Bevin, or else pundits would say the president “suffered the greatest defeat in the history of the world.” The remarks reflected the extent to which Bevin, 52, sought to nationalize the campaign, emphasizing his support for Trump amid a Democratic-led impeachment inquiry of the Republican president in Congress. While the result would be a setback for Trump, who remains relatively popular in Kentucky, it may have had more to do with Bevin’s diminished standing in the state. Opinion polls showed Bevin may be the least popular governor in the country, after he waged high-profile fights with labour unions and teachers. The potential upset in Kentucky headlined elections in four states on Tuesday. In Mississippi, voters were also choosing a new governor, with incumbent Republican Phil Bryant barred from running again because of term limits. Trump rallied in Mississippi last week with the Republican candidate, Lieutenant Governor Tate Reeves, who is running against Attorney General Jim Hood, a moderate Democrat who favours gun rights and opposes abortion rights. Like Bevin, Reeves campaigned as a staunch supporter of Trump, who easily carried Mississippi in the 2016 presidential election. In Virginia, Democrats appeared poised to wrest both chambers of the legislature from Republican majorities, which would give the party complete control of the state government for the first time in decades. Trump has avoided Virginia, where Democrats found success in suburban swing districts in last year’s congressional elections. Tuesday’s election suggested the trend was continuing. Overall, the election results will be closely scrutinized for clues to how next year’s presidential contest will unfold. While none of the four states voting on Tuesday â€“ New Jersey also had legislative elections â€“ is likely to be up for grabs in November 2020, the outcomes could offer an early measuring stick for the Democratic presidential candidates eager to deny Trump a second four-year term. “You’re seeing this nationalization happen,” said Kyle Kondik, an elections analyst at the University of Virginia’s Centre for Politics. “These states are good tests for that.” Beshear’s upset could bolster Democratic hopes of ousting Republican Senate Majority Leader Mitch McConnell, who is on the ballot himself in the state next year. The Virginia contest drew heavy attention and money from both parties. Former Vice President Joe Biden, a Democratic presidential front-runner, visited Virginia over the weekend to campaign with several statehouse candidates, and Republican Vice President Mike Pence held a rally on Saturday. Other Democratic presidential contenders, including U.S. Senators Elizabeth Warren, Kamala Harris, Amy Klobuchar and Cory Booker, have also campaigned with local candidates.