President Trump tried to distance himself from Republican gubernatorial candidate Ed Gillespie on Twitter late Tuesday, after Democratic candidate and Virginia Lt. Gov. Ralph Northam won the state's highly contested governor's race.

Both parties poured money and staff into the Virginia election, which was seen as a potential bellwether for Trump’s impact on mid-term elections across the country next year.

"Ed Gillespie worked hard but did not embrace me or what I stand for," Trump tweeted after the election. "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, who is traveling in South Korea, had been a vocal supporter of Gillespie but had never hit the campaign trial for the former Republican National Committee chairman.

Earlier Tuesday, Trump tweeted, ".@EdWGillespie will totally turn around the high crime and poor economic performance of VA." Last month, Trump first came out to support Gillespie on Twitter by bashing Northam.

Contributing: Nicole Gaudiano