Trump, in a tweet posted from South Korea, grumbled that the defeat was a result of Republican candidate Ed Gillespie not “embracing” him or what he stands for.

Former US President Barack Obama (right) gestures to Democratic candidate Ralph Northam during a campaign rally in Richmond, Virginia, last month. Northam, a physician and Gulf War veteran, easily defeated Ed Gillespie, an establishment Republican figure, in the state elections.(AFP File)

Democrats won the governorship and all major positions in Virginia, a state that abuts the national capital, in an election that had come to be seen as a test of President Donald Trump, his policies and – most significantly – his unabashedly divisive politics.

However, the president grumbled in a tweet from South Korea that the Republican candidate hadn’t done enough to emerge victorious. “Ed Gillespie worked hard, but did not embrace me or what I stand for... but with the economy doing record numbers, we will continue to win, even bigger than before!” he said.

But there was more bad news for Republicans and Trump. Democrat Phil Murphy picked up the governorship of New Jersey, reclaiming a deep blue state from Republicans who had ruled it for eight straight years under Chris Christie.

Christie’s public spats with hecklers made for good entertainment, but not enough to mask his obvious missteps – including one that had his officials shutting down an inter-state highway to punish a political adversary.

Democrats notched wins in other races as well.

Republicans had given up on New Jersey early on but held hopes for Virginia, a once-conservative state that steadily turned blue in recent years mostly due to the diverse demographics in cities to the north (including a booming population of Indian Americans in counties such as Loudon and Fairfax). This was the only southern state Hillary Clinton won in 2016.

Gillespie once headed the Republican party’s national committee and acted as the chairman of Mitt Romney’s 2012 presidential campaign. He was also a moderate who struggled to stay as far as he could from Trump, at least initially. He would not even name the president in his speeches.

Trump did not campaign for Gillespie either, just as he did not go to New Jersey. It’s also possible that the candidates may not have wanted him. However, in the closing stages of the race in Virginia, Trump came to Gillespie’s aid with some tweets because the Republican candidate was unable to close the gap with his Democratic rival in the polls. Steven Bannon, the president’s former chief strategist, also weighed in for him.

Gillespie himself pivoted towards Trump-style racially charged cultural issues, such as support for confederate-era monuments that many Americans believe are reminders of a troubling chapter in the country’s past, attacks on crimes linked to illegal immigrants, and the ongoing controversy over players not standing up for the national anthem before football games. The future of healthcare, with Republicans committed to repealing former President Barack Obama’s Affordable Care Act, was also a top election issue in Virginia.

However, neither Trump – whose poll ratings are at a record low for presidents at this stage of their term – nor his politics helped Gillespie in the end.