RICHMOND — Voters in Virginia and New Jersey gave Democratic gubernatorial candidates resounding victories Tuesday and sent a clear message of rebuke to Republican President Trump.
In Virginia’s hard-fought contest, Democratic Lieutenant Governor Ralph Northam defeated Republican Ed Gillespie. In New Jersey, front-running Democrat Phil Murphy overcame Republican Lieutenant Governor Kim Guadagno to succeed unpopular GOP Governor Chris Christie.
‘‘The days of division are over. We will move forward,’’ Murphy said in his victory speech.
The wins in Virginia and New Jersey are a morale boost to Democrats who had so far been unable to channel anti-Trump energy into success at the ballot box in a major election this year.
‘‘The people are gonna rise up. They’re not gonna take what he says and this is not fake news,’’ said Leanna Barnes, a 76-year-old from East Orange, N.J., who voted for Murphy and added she saw his victory as a message to the president.
Virginia college student Tamia Mallory said she began paying attention to her state’s gubernatorial race when she saw tweets from Trump endorsing Gillespie. That motivated her to examine the race and find out who was running against Gillespie, she said.
‘‘It was kind of an anti-Trump vote,’’ Mallory said.
Northam, the state’s lieutenant governor, repeatedly sought during long months of divisive campaigning to tie Gillespie to the president. His victory was in large part due to the surge in anti-Trump sentiment since the president took office. Democrats said they had record levels of enthusiasm heading into the race in Virginia, a swing-state and the only Southern state that Trump lost last year.
Gillespie, meanwhile, sought to keep Trump at a distance throughout the campaign but tried to rally the president’s supporters with hard-edge attack ads focused on illegal immigration and preserving Confederate statues. The strategy was criticized by Democrats and some Republicans as race baiting, but drew praise from former Trump strategist Steve Bannon and others as a canny way to win a state that voted for Hillary Clinton last year.
Trump lent limited preelection support to Gillespie with robocalls and tweets.
In one call, Trump said Gillespie shared his views on immigration and crime and would help ‘‘Make America Great Again.’’ Trump also said Northam would be a ‘‘total disaster’’ for Virginia.
But after Tuesday’s loss, Trump suggested that Gillespie hurt himself by not more closely aligning himself with the president.
‘‘Ed Gillespie worked hard but did not embrace me or what I stand for,’’ Trump said in a tweet after Northam won. He also pointed out that Republicans have won every special election to the US House since he was elected.
Northam’s victory is a blow to Republicans, who were hoping that Gillespie could provide a possible roadmap for moderate Republicans to follow in next year’s midterm elections. Several Republicans have revealed plans to retire next year instead of seeking re-election.
Gillespie struck a humble tone in his concession speech as he offered support to Northam.
He wiped tears from his eyes while thanking his wife and said the million people who voted for him love Virginia, and so do those who disagree with them.
‘‘And I know they too are rooting for our new governor to succeed because we all love the commonwealth of Virginia,’’ Gillespie said.
The mood was subdued at Gillespie’s party at a Richmond-area hotel, with supporters not shocked at the outcome but surprised at how poorly Republicans did. Democrats swept all three of Virginia’s statewide races, including contests for attorney general and lieutenant governor. Several incumbent state House Republicans also lost their seats.
Gillespie supporter Elsa Smith said Republicans needed to do a better job of appealing to minorities if they want to win future races. ‘‘We are not taking care of the demographics the way we should,’’ said Smith, an owner of a Spanish translation business.
Democrats were gleeful at Northam’s victory party. US Representative Gerry Connolly called Northam the ‘‘perfect antidote’’ to the president. ‘‘This is a comprehensive victory from the statehouse to the courthouse. Thank you, President Trump,’’ Connolly said.
The Democratic victories are another sign of Virginia’s shift toward a more liberal electorate. Democrats have won every statewide election since 2009 and now have won four out of the last five gubernatorial contests. Northam banked heavily during the campaign on his near-perfect political resume and tried to cast himself as the low-key doctor with a strong Southern drawl as the healer to Trump’s divisiveness.
A pediatric neurologist and Army doctor, Northam made health care reform a centerpiece of his political career and current campaign, winning key allies along the way. As a state senator he was a leading opponent of a Republican effort to mandate ultrasounds before abortions in 2012, winning him strong support from well-funded abortion-rights groups.
In other elections across the country:
■ In addition to keeping the governorship, Democrats nearly wiped out Republicans’ overwhelming majority in the Virginia House of Delegates. One of the Democratic newcomers will be Danica Roem, a transgender woman who unseated Bob Marshall, one of the chamber’s longest serving and most conservative members. Earlier this year, Marshall sponsored a bill that would have limited the bathrooms transgender people can use. Roem will be Virginia’s first openly transgender lawmaker. She will also make history as the first openly transgender person elected and seated in a state legislature, according to the Victory Fund, a political action committee that works to get openly LGBTQ people elected.
■ New York Mayor Bill de Blasio easily won a second term, capitalizing on economic growth, low crime, and a weakened Republican Party in a race he turned into a referendum on progressive government. The incumbent Democrat handily defeated Republican Nicole Malliotakis, a member of the state assembly, and a smattering of independent and third-party candidates.
■ Voters in Ohio defeated a measure on Tuesday that would have limited the price of prescription drugs purchased by the state. The referendum would have required that the state pay no more for drugs than what the federal Department of Veterans Affairs pays for those same drugs. The provision would have applied to state-purchased drugs bought as part of the Medicaid program for low-income people. The Veterans Affairs Department buys drugs at 24 percent below typical prices, in addition to other discounts. The measure drew strong resistance from drugmakers, which spent more than $49 million to try to defeat it, and the loss underscored the formidable influence of the pharmaceutical industry.
■ Mayor Karen Weaver of Flint, Mich., survived a recall attempt on Tuesday, local election officials reported, and will continue serving for the next two years. She emerged with the most votes in a field of 18 candidates that included Scott Kincaid, a city councilman. Weaver took office in 2015 as Flint was grappling with lead-tainted drinking water, the result of decisions by emergency managers appointed by the state to oversee the fiscally struggling city. She gained national prominence by calling attention to the city’s water woes and pushing for assistance from federal and state agencies.But Weaver, a psychologist who had never before held political office, quickly found herself at odds with the Flint City Council over plans for a long-term drinking water source.Material from The New York Times and Washington Post were used in this report.