Republican candidate for Virginia governor Ed Gillespie talks to journalists after casting his vote at the polling place at Washington Mill Elementary School November 7, 2017 in Alexandria, Virginia.

President Donald Trump on Tuesday blamed Republican Ed Gillespie's projected loss in the Virginia governor's race on Gillespie's failure to fully "embrace" Trump.

Trump tweet: 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!

Virginia Democratic Lt. Gov. Ralph Northam was the projected winner of the race Tuesday shortly after polls closed.

Northam had maintained a lead in statewide polls throughout the campaign, but in recent weeks the Democrat's polling advantage had dropped significantly, from an average of nearly 7 points in early October to just 3 points going into Election Day, according to Real Clear Politics.

The "4 House seats" Trump refers to in his Tweet appear to be the four special elections held this year to replace members of Congress who were appointed to positions in the Trump administration: CIA Director Mike Pompeo, Interior Secretary Ryan Zinke, former Health and Human Services Secretary Tom Price, and Mick Mulvaney, who was named director of the Office of Management and Budget.

The four men resigned from House seats in Kansas, Montana, Georgia and South Carolina, respectively -- all states that Trump carried by wide margins in the 2016 presidential election.