President Donald Trump distanced himself from losing Virginia gubernatorial candidate Ed Gillespie in a tweet Tuesday—only days after praising the candidate.

Trump’s tweets distancing himself from Gillepsie came after news outlets called the race for Democratic Lieutenant Governor Ralph Northam, who cruised to a comfortable victory with a 53 percent share of the vote to Gillespie's 44 percent. 

"Ed Gillespie worked hard but did not embrace me or what I stand for. Don’t forget, Republicans won 4 out of 4 House seats, and with the economy doing record numbers, we will continue to win, even bigger than before!" Trump tweeted from South Korea, which he is visiting as part of a 13-day tour of Asia.

On Tuesday, Trump has recorded a robocall message to voters in Virginia praising the candidate's stance on immigration and law and order. 

“Like me, Ed is tough on crime and on the border. Ed will protect your family from crime, drugs and violence— something Northam will never do," Trump said in the robocall. "With your help, Ed Gillespie will help make America great again, a phrase that I like a lot. Vote Ed Gillespie."

During the Virginia election campaign, candidates Northam and Gillespie tussled over issues including immigration and the removal of Confederate statues.

Northam was criticized by progressives, after reversing his position and saying he would oppose attempts by Virginia cities to gain sanctuary city status. Gillespie criticized Northam, claiming he had failed to crack down on gang violence. 

It’s not the first time Trump has performed an abrupt U-turn following the loss of a candidate he backed. In August, Trump deleted a series of tweets expressing support for Alabama Senatorial candidate Luther Strange, after he was defeated by populist Roy Moore.

In another victory for the Democrats Tuesday, New York City’s mayor, Bill de Blasio was comfortably re-elected.