Image copyright Getty Images Image caption Donald Trump shakes hands with Kentucky governor Matt Bevin during a rally in Lexington, Kentucky

Off-year state elections in the US can be a mixed bag or harbingers of things to come.

Democratic gains in Virginia and New Jersey in 2017 presaged an electoral wave in 2018 that delivered control of the US House of Representatives to the party for the first time in eight years.

On Tuesday voters in a handful of states once again headed to the polls - and the message they delivered was one that again should be of concern to Donald Trump and the Republican Party.

Here are a few takeaways from a night of balloting just under a year from the 2020 national election.

A Trump-loving governor facing defeat

Four years ago, Republican Matt Bevin won the Kentucky governorship by campaigning as an outspoken businessman outsider. He beat more establishment candidates for his party's nomination and upended the Democrat in the general election with broad support from rural parts of the state.

In short, he was a Donald Trump-style candidate a year before Donald Trump won the presidency.

Image copyright Getty Images Image caption Matt Bevin was elected governor of Kentucky in 2015

Once in office, Bevin governed a lot like Trump, as well.

He used big Republican majorities in his state legislature to push through controversial legislation that included dismantling an Obama-era public healthcare programme, occasionally became mired in controversy and generally catered primarily to his loyal supporters.

Despite sinking popularity in opinion polls, he contended that he would win a comfortable re-election.

He didn't.

Whatever magic Bevin had in 2015, it had worn off by Tuesday night's election, as Bevin appears to have been narrowly defeated by the young, charismatic Democratic Attorney General Andy Beshear.

Image copyright Getty Images Image caption Democrat Andy Beshear said he was ready for his first day in office

Bevin's strength in the rural parts of the state weren't enough to overcome Beshear's margins in the cities and - of particular concern to Republicans - the kind of suburban areas that also were key to many Democratic wins in 2018.

Although Kentucky has a history of electing Democratic governors (Beshear's father ran the state before Bevin), the state has trended solidly conservative in recent years. In 2016, Trump carried it by 30% - one of his largest margins of victory anywhere.

Trump himself threw his support behind Bevin in the campaign's closing days, holding a rally in Lexington on Monday - and warned that a Bevin loss could bolster the forces pushing for his impeachment.

Media playback is unsupported on your device Media caption President Trump mocked Democrat Beto O'Rourke for withdrawing from the 2020 presidential race

"If you lose, they will say Trump suffered the greatest defeat in the history of the world," the president said at that rally. "You can't let that happen to me, and you can't let that happen to your incredible state."

The president wasn't wrong. Republicans did well in other Kentucky races and Bevin's loss may be by the narrowest of margins (and could lead to a court-ordered recount), but it will be cited as evidence of Trump's weakened political muscle.

Virginia goes full blue

In 2017 Virginia Democrats retained the state's governorship while coming within a hair of winning control of the state house of delegates for the first time in 18 years - a result that few had predicted was possible.

On Tuesday the party finished the job, winning both chambers of the state's legislature and delivering the party unified control of the state government for the first time since 1993.

Two years ago, Danica Roem became the first openly transgender candidate to win election a state legislature seat. On Tuesday the Democrat won re-election by a 14% margin.

Image copyright Reuters Image caption Voters cast their ballots in state and local elections in Virginia

In a Richmond suburb, Democrat Ghazala Hashmi won an upset victory to become the first Muslim woman in the state's senate.

Democrats also defeated the last Republican legislator left in the Washington, DC, suburbs - yet another indication that the Trump presidency has cost the Republican Party support in what has been a key swing demographic.

Both of Virginia's US senators are also Democrats, as is a majority of the state's House of Representatives delegation (thanks to 2018 victories).

In other words, Virginia - which was once comfortably Republican and recently had been considered a swing state - is solidly Democratic blue.

Democrats will now be able to draw legislative district lines for the coming decade that consolidate their power, and pass new gun-control restrictions and minimum-wage laws.

Earlier this year, the state's governor was mired in a scandal over a photograph of a person in blackface in his medical school yearbook, prompting concerns among Democrats that it would take a toll on their electoral prospects.

It didn't. Instead the trend in Virginia that started in 2017 continued through 2019. As some recent polls show, Trump still has a path to an Electoral College victory and presidential re-election in 2020, but it is highly doubtful that course will run through Virginia.

A Republican silver lining

The other governor's race on the ballot on Tuesday was in deeply conservative Mississippi. There had been some concern among Republicans that their candidate could be in a closer-than-expected race.

Image copyright Getty Images Image caption Tate Reeves, pictured here, was endorsed by Donald Trump ahead of the election

Their fears appear to be unfounded, as Tate Reeves holds a comfortable margin over Democrat Jim Hood.

Winning a state-wide race in Mississippi may be not much of a cause for celebration given the Virginia and Kentucky results, but on down nights a party will take happiness where they can find it.