Democrats came out victorious in several of Tuesday’s key elections, including gubernatorial races in Virginia and New Jersey, leaving the party motivated for the upcoming 2018 election.

"The America that Donald Trump comes back to in a few days is far different than the America he left,” DNC Chairman Tom Perez said Tuesday night, referencing President Trump’s absence as he visits Asia. “It’s an America where we are regaining our values.”

“The last time Democrats won the governors race in Virginia and New Jersey, in the same year, was 2005,” Perez added. “You know what we did the following year? We took the House of Representatives! That’s what we’re going to do next year.”

In Virginia’s gubernatorial election, Democratic candidate and current Lt. Gov Ralph Northam defeated his Republican opponent, Ed Gillespie.

Trump weighed in on the Virginia gubernatorial election's result, claiming Gillespie lost to Northam because he didn’t embrace Trumpism.

“Ed Gillespie worked hard but did not embrace me or what I stand for,” Trump tweeted Tuesday night before going on about the special elections this year for Congress. “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!”

Despite his harsh critique of Gillespie after the election was called, Trump had repeatedly vouched for Gillespie via tweets and a robocall in the days leading up to the contest.

"Ralph Northam will allow crime to be rampant in Virginia. He's weak on crime, weak on our GREAT VETS. Anti-Second Amendment ... and has been horrible on Virginia economy. Vote @EdWGillespie today!" Trump tweeted Tuesday morning. "@EdWGillespie will totally turn around the high crime and poor economic performance of VA. MS-13 and crime will be gone. Vote today, ASAP!"

Virginia saw other Democratic victories as well on Tuesday. Democrat Justin Fairfax won Virginia’s lieutenant governor race and another Democrat, Mark Herring, won the state’s attorney general race.

In the Virginia state legislature, Democrats unseated at least 11 GOP incumbents on Tuesday night and flipped three seats that had previously been held by Republican incumbents who did not run for re-election, according to the Washington Post. Republicans, who had 66 out of the 100 seats, have controlled the delegation since 2000. Four more races, that as of press time were too close to call, will determine who has control of the chamber following the 2017 election. Notably, Democrat Danica Roem won one of the seats and made history by being the first openly transgender state legislator.

In New Jersey, Democratic candidate Phil Murphy beat Republican Lt. Gov. Kim Guadagno, handing the governor's mansion back to Democrats after the very unpopular Republican Gov. Chris Christie’s eight years in office. Murphy was previously a Goldman Sachs executive and U.S. ambassador to Germany under the Obama administration.

New York Mayor Bill de Blasio was re-elected to a second term, beating Republican Nicole Malliotakis, a member of the state assembly, and other third-party candidates.

“We have so much to be proud of over these last four years,” de Blasio said during his victory speech at the Brooklyn Museum. “But we can’t stop now.”

Though much of the attention was given to the Democratic victories on Tuesday, the Republicans did not walk away empty-handed.

Republican John Curtis, mayor of Provo, Utah, won the vacant seat of former Republican Rep. Jason Chaffetz. Chaffetz announced earlier this year he would be stepping down at the end of June so he could spend more time with his family. Meanwhile, he has since accepted a position as a Fox News commentator.

Curtis defeated Democrat Kathie Allen and third-party candidate Jim Bennett in the election, despite efforts to try to connect him to President Trump. Curtis diffused the allegations by saying although he supported Trump’s agenda, he did not vote for Trump in 2016.