Updated

Democrat Ralph Northam won Virginia’s gubernatorial race Tuesday – and President Trump immediately started to criticize the Republican candidate.

Ed Gillespie, the Republican politico, failed to “embrace” the president, Trump tweeted Tuesday evening while in Asia. Until the results came in, Trump often took to Twitter to encourage Virginians to vote for Gillespie and accused Northam of "fighting for the violent MS-13" gang.

However, while Gillespie entwined much of Trump’s policies, he didn’t utilize the president while campaigning. Trump lost the swing state to opponent Hillary Clinton by about 5 points during the 2016 election.

Northam received 54 percent of the vote to Gillespie’s 45 percent, with 99 percent of precincts reporting. The lieutenant governor led Gillespie by about 5 percentage points in a Fox News poll ahead of the election.

Here’s a look at the candidates.

Ralph Northam, Democrat

northam

Ralph Northam, Virginia's Democratic gubernatorial candidate, is the current lieutenant governor of the state. (AP Photo/Steve Helber)

Ralph Northam, the lieutenant governor of Virginia, is a physician and Army veteran. On his campaign website, he said he is “most proud” of “his career fighting for children – as a pediatric neurologist and volunteer medical director for a pediatric hospice care facility.”

While current Virginia Gov. Terry McAuliffe is barred by state law from running for re-election, Northam, 58, is expected to govern the commonwealth much as McAuliffe did. He ran on greater gun control and abortion rights. He also promised to “be a brick wall against the discrimination of the Trump administration.”

Northam lives in Norfolk, Va., with his wife. They have two children.

Ed Gillespie, Republican

gillespie

Republican Virginia gubernatorial candidate Ed Gillespie is the former National Republican Committee chair and severed as a counselor to former President George W. Bush. (AP Photo/Steve Helber)

This wasn’t Ed Gillespie’s first rodeo when it came to Virginia politics. The 56-year-old ran against incumbent Sen. Mark Warner, D-Va., in 2014 and nearly defeated him.

Gillespie is a former chair of the National Republican Committee and served as a counselor to former President George W. Bush for nearly two years. Gillespie touted his leadership within conservative circles on his campaign website, highlighting his time as chairman of the Republican Party of Virginia and work as a communications aide to former House Majority Leader Dick Armey.

Gillespie and his wife have three children and live in Fairfax County, Va. He graduated from Catholic University of America in Washington, D.C.

Endorsements and ads

While Trump endorsed Gillespie in a tweet in October, the establishment gubernatorial candidate didn't totally embrace the president on the campaign trail. And he almost lost to an ardent Trump defender in the primary race.

But as the race came to a close, Gillespie reinvented himself and adopted more of Trump’s racially-tinged policies.

Still, Trump offered his support and encouraged his more than 40 million Twitter followers to “Vote Ed Gillespie!”

Trump also accused Northam of “fighting for the violent MS-13 killer gangs [and] sanctuary cities.”

Northam responded on Twitter with a link to his campaign donations website. He called the president a “narcissistic maniac” multiple times during the primary.

"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," Trump tweeted on the morning of the election.

Advertisements from both sides had been criticized ahead of Election Day.

Northam’s campaign came under fire for a Democratic mailer that showed Gillespie and Trump along with a photo of the angry white nationalists carrying torches who descended on Charlottesville, Va., in August. The mailer encourages voters to “stand up to hate.”

Northam stood by the mailer and slammed Gillespie for not denouncing Trump “for not calling these white supremacists out for who they are.”

“Because the message is that we live in a very diverse society. That means that we need to be inclusive,” Northam said, according to the Richmond Times-Dispatch.

Another highly criticized ad – this one from the nonprofit Latino Victory Fund – showed frightened minority children being chased by a truck with a “Gillespie for governor” sticker, a Gadsden flag vanity license plate and Confederate flag.

“Is this what Donald Trump and Ed Gillespie mean by the American Dream?” a narrator asks in the one-minute spot.

Chris Leavitt, Gillespie’s campaign manager, slammed the advertisement as “an all-out attack on the people of Virginia” and blamed “Northam and his allies” for what he called a “desperate smear campaign.”

Northam’s supporters “have reached a new low with a disgusting, vile television ad seeking to instill fear in our children with that same imagery,” Leavitt said in a statement to Fox News.

Northam's campaign has defended the ad. Campaign spokeswoman Ofirah Yheskel said in a statement that, "It's not shocking that communities of color are scared of what his Trump-like policy positions mean for them."

The ad was deleted after the New York City terrorist attack in October.

Gillespie, too, was criticized for ads in support of his campaign. He released several spots that attempted to tie Northam to the MS-13 gang.

One ad in particular showed a sinister hooded figure holding a baseball bat as the word’s “Kill, Rape, Control” – MS-13’s motto – flash on the screen. The ad accuses Northam of being “weak” on combating the gang.

The Northam campaign called Gillespie’s ads “beyond the pale.”

Bush hosted a fundraiser for Gillespie in Virginia in October. And Vice President Mike Pence joined him at a weekend rally.

Former Democratic presidential nominee Hillary Clinton headlined a fundraiser for Northam in New York. And former Vice President Joe Biden backed Northam during a roundtable event.

Former President Barack Obama and Sen. Corey Booker, D-N.J., also campaigned for Northam.

Fox News’ Nicole Darrah and The Associated Press contributed to this report.