Murphy Obama
CNN
Murphy Obama
Now playing
00:56
Murphy reacts to Obama's congratulatory tweet
Virginia Gov.-elect Ralph Northam walks onstage to celebrate his election at the Northam For Governor election night party at George Mason University in Fairfax, Va., Tuesday, Nov. 7, 2017. (AP Photo/Cliff Owen)
Cliff Owen/AP
Virginia Gov.-elect Ralph Northam walks onstage to celebrate his election at the Northam For Governor election night party at George Mason University in Fairfax, Va., Tuesday, Nov. 7, 2017. (AP Photo/Cliff Owen)
Now playing
01:21
Best of Ralph Northam's victory speech
Rep. Scott Taylor 110817 newday
CNN
Rep. Scott Taylor 110817 newday
Now playing
00:56
GOP lawmaker: Election a referendum on Trump
CNN
Now playing
01:07
GOP lawmaker: We failed to nationalize race
ABINGDON, VA - OCTOBER 14:  Gubernatorial candidate Ed Gillespie, R-VA, speaks at a campaign rally at the Washington County Fairgrounds on October 14, 2017 in Abingdon, Virginia.  Virginia voters head to the polls on Nov. 7. (Photo by Sara D. Davis/Getty Images)
Sara D. Davis/Getty Images North America/Getty Images
ABINGDON, VA - OCTOBER 14: Gubernatorial candidate Ed Gillespie, R-VA, speaks at a campaign rally at the Washington County Fairgrounds on October 14, 2017 in Abingdon, Virginia. Virginia voters head to the polls on Nov. 7. (Photo by Sara D. Davis/Getty Images)
Now playing
01:23
Trump on VA loss: Candidate didn't embrace me
Now playing
01:16
Historic election night wins for minorities
Elaine Thompson/AP/Carlos Gonzalez/Star Tribune via AP/Jahi Chikwendiu/The Washington Post via AP
Now playing
02:21
Women opposed to Trump win elections across US
Danica Roem
Now playing
00:42
First openly transgender state lawmaker elected in Virginia
Now playing
00:50
Perez: Dems' unity is Trump's worst nightmare
title: Nick Corasaniti - After voting, Christie got into a bit of an argument with a voter who questioned why he didn't merge His two towns  duration: 21:02:39  site: Twitter  author: null  published: Wed Dec 31 1969 19:00:00 GMT-0500 (Eastern Standard Time)  intervention: yes  description: null
nytnickc
title: Nick Corasaniti - After voting, Christie got into a bit of an argument with a voter who questioned why he didn't merge His two towns duration: 21:02:39 site: Twitter author: null published: Wed Dec 31 1969 19:00:00 GMT-0500 (Eastern Standard Time) intervention: yes description: null
Now playing
01:42
Christie spars with voter at NJ polling place

Story highlights

"Every office in a democracy counts!" Obama tweeted.

Former Vice President Joe Biden also tweeted congratulations

(CNN) —  

Former President Barack Obama was among the Democrats celebrating their party’s electoral wins Tuesday night, congratulating Ralph Northam and Phil Murphy.

“This is what happens when the people vote. Congrats @RalphNortham and @PhilMurphyNJ . And congratulations to all the victors in state legislative, county and mayors’ races. Every office in a democracy counts!” Obama tweeted.

Northam won the Virginia governor’s race and Murphy took a New Jersey governor’s office that had been in Republican Chris Christie’s hands for eight years.

Former Vice President Joe Biden also tweeted congratulations, writing, “A resounding defeat tonight for President Trump. Voters around the country rejected the ugly politics we have seen this past year. Instead, they chose candidates who unite and inspire us.”

He continued by individually congratulating Democratic candidates who won across the country so far, including those in mayoral and statehouse contests.

Virginia’s gubernatorial contest was the first major test of Democrats’ ability to rebound after Trump’s victory. Both Obama and Biden, who are showing an appetite to play surrogate roles in 2018, campaigned for Northam in the race leading up to the election.

Hillary Clinton retweeted herself on Tuesday night, reminding her followers of her tweet she sent a day after she lost the 2016 election to Donald Trump.

She retweeted herself saying, “Yes!” to a tweet where she wrote, “Scripture tells us: Let us not grow weary in doing good, for in due season, we shall reap, if we do not lose heart.”