Democrats on Tuesday claimed victory in state elections, in what is seen as a blow to President Donald Trump.

After a tight race in Kentucky – a conservative-leaning state – Andy Beshear (D) claimed the victory to become governor of the state.

Also in Virginia, Democrats seized full control of the legislature, the first time in over two decades.

The results are being viewed as a gauge of the political mood ahead of next year’s presidential election.

However, Republicans held onto power in the Mississippi governor vote, following a closely-fought race.

In Kentucky, Mr Beshear claimed victory over incumbent Republican governor Matt Bevin after final results gave him a lead of 0.4%.

Mr Bevin, 52, has reportedly said he will not concede, citing unspecified “irregularities”.

However, Mr Beshear, a 41-year-old attorney general whose father was a former governor of the state, said: “We will be ready for that first day in office and I look forward to it.”

Kentucky’s loss is seen as a setback for Mr Trump, who attempted to galvanise support for Mr Bevin at a campaign rally on Monday night.

In a speech to thousands of supporters, Mr Trump said a loss for Mr Bevin would be characterised as “the greatest defeat in the history of the world” by his critics.

Mr Trump, who won Kentucky in the 2016 presidential election, said Mr Beshear was “too extreme and too dangerous” to govern the state.

But despite losing the governor’s race, Republican candidates claimed victory in five other votes in Kentucky, including a poll for the state’s Attorney General.

Meanwhile, in Virginia, Democrats overturned Republican majorities in both chambers of the state legislature.

The election of Danica Roem, the first openly transgender person to serve in the House, and Ghazala Hashmi, who will be the first Muslim woman in the Senate, were among the Democrat’s notable victories in the state.

Ahead of the vote, Democratic presidential hopefuls – including frontrunners Joe Biden and Elizabeth Warren – had campaigned with local candidates.

Although the presidential election is more than a year away, Tuesday’s results are being seen as a reflection of Mr Trump’s popularity among voters as he faces an impeachment inquiry.

Mr Trump has reacted to the results hailing the performance of Republicans in Kentucky and Mississippi.

He congratulated Tate Reeves, who defeated Democrat Jim Hood to extend the Republican Party’s two-decade hold on the governor’s office in Mississippi.

On Mr Bevin’s defeat, Mr Trump’s 2020 campaign manager suggested the president’s presence at a rally in the state boosted his vote-share.

“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,” Brad Parscale said.