The opposition Democrats claimed an upset win in the state of Kentucky on Tuesday over a Republican governor backed by President Donald Trump, and seized control of the state legislature in Virginia, where anti-Trump sentiment in the suburbs remained a potent force.

The outcomes of Tuesday's elections in four states, including Mississippi and New Jersey, could offer clues to how next year's presidential election could unfold when Trump will aim for a second four-year term.

More: 

In Kentucky, Democratic Attorney General Andy Beshear, whose father, Steve, was the state's last Democratic governor, scored a narrow victory over Governor Matt Bevin despite an election-eve rally headlined by Trump.

In a speech in Lexington, Kentucky, on Monday night, Trump - who won Kentucky by 30 percentage points in 2016 - 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 nationalise the campaign, emphasising his support for Trump amid a Democratic-led impeachment inquiry of the Republican president in Congress.

Hope for Democrats

While the result was a significant 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.

Beshear's upset win could also bolster Democrats' slim hopes of ousting Republican Senate Majority Leader Mitch McConnell, who is on the ballot himself in the state next year.

US President Trump tests mood on impeachment at Kentucky rally

At a rally on Tuesday night, Bevin refused to concede, citing unspecified "irregularities," even as Beshear called on the governor to honour the results.

Trump's 2020 campaign manager, Brad Parscale, said in a statement that the president "just about dragged Gov Matt Bevin across the finish line" while helping Republicans win several other statewide races.

Meanwhile, Democrats wrested both chambers of Virginia's legislature from narrow Republican majorities, which would give the party complete control of the state government for the first time in a quarter-century.

Trump has avoided Virginia, where Democrats found success in suburban swing districts in last year's congressional elections, as they did in states across the country.

Tuesday's election, which saw Democrats prevail in several northern Virginia suburbs, suggested the trend was continuing.

In Mississippi, where Republican Governor Phil Bryant was barred from running again due to term limits, Republican Lieutenant Governor Tate Reeves defeated Attorney General Jim Hood, a moderate Democrat who favours gun rights and opposes abortion rights.

Like Bevin, Reeves campaigned as a staunch Trump supporter in a state that Trump easily won in 2016. The president held a campaign rally in the state last week alongside Reeves.

In New Jersey, Democrats were expected to maintain their majority in the state's general assembly, the legislature's lower chamber.