Former President Obama on Wednesday celebrated the Democratic victories in Tuesday's elections.

"This is what happens when the people vote. Congrats @ RalphNortham and @ PhilMurphyNJ," Obama tweeted.

"And congratulations to all the victors in state legislative, county and mayors' races. Every office in a democracy counts!"

Obama congratulated Lt. Gov. Ralph Northam (D) for winning the Virginia governor's race.

ADVERTISEMENT

Northam defeated his GOP opponent, Ed Gillespie, by nearly 9 points.

The wins give the Democrats a badly needed jolt of momentum ahead of the 2018 midterms.

Democrat Phil Murphy easily won the New Jersey governor's race. Murphy, a former Goldman Sachs executive and U.S. ambassador to Germany, defeated Lt. Gov. Kim Guadagno (R), who struggled to gain traction in the race.

Guadagno faced headwinds from President Trump's unpopularity in the state, while also being saddled with outgoing Gov. Chris Christie's (R) historically low approval ratings.

The breadth of the Democratic wins surprised most. But as the results came in on Tuesday, Democrats said they had energized their core voters and capitalized on President Trump's unpopularity to reach swing voters.

"This is not a wave. This is a tsunami," Virginia Del. David Toscano, leader of the state's Democratic caucus, told The Hill in an interview Tuesday night.