President Obama phoned several Democrats who won Tuesday night. 

He called Virginia Governor-elect Terry McAuliffe, New York City Mayor-elect Bill de Blasio and Boston Mayor-elect Martin Walsh.

“He congratulated each of them on their election victories and vowed to work with them in the months ahead to expand economic opportunity for middle class families in their communities,” White House spokesman Jay Carney said in a statement.

Obama had campaigned for McAuliffe and de Blasio during the last leg of their races. He made a quick stop for McAuliffe in Virginia on Sunday and attended a fundraiser for de Blasio during an education-focused trip to New York a few weeks ago.

The Virginia gubernatorial race had not been called immediately after the polls closed at 7 p.m., like the New Jersey governor’s race. Republican Attorney General Ken Cuccinelli had been leading initially, but the remaining counties were those in Northern Virginia, which are heavily Democratic.

With nearly 100 percent of precincts reporting Wednesday morning, McAuliffe defeated Cuccinelli by less than 3 percentage points.

De Blasio's race was called shortly after polls closed at 9 p.m. in New York. He beat Republican Joe Lhota in a landslide. 

In Boston, Walsh defeated John Connolly. Walsh succeeds Mayor Tom Menino, who has served as the city’s mayor for 20 years.