In Virginia, as in several contests across America on Tuesday, the Trump resistance won. And it wasn't close.

Northam, a pediatric neurologist and Army veteran, led longtime Republican operative Gillespie by several points as the final votes ticked in. "I'm here to let you know that the doctor is in," a smiling Northam told supporters in suburban Washington, D.C. "As long as I'm governor, I will work hard to make sure we're inclusive."

He added, "Virginia has told us to end the divisiveness, that we do not condone hatred and bigotry and to end the politics that have torn this country apart."

Democrats also scored victories in the race for New Jersey governor and in Maine, where voters slapped the state's Republican governor, a Trump ally, by backing a measure to expand Medicaid coverage under former President Barack Obama's health care law. The Democratic mayors of New York and Boston, both vocal Trump critics, also won re-election easily.

And Virginia voters elected the state's first openly-transgender state representative, among more than a dozen state legislative pickups for Democrats.

The resounding victories marked the GOP's most significant day of defeat in the young Trump presidency and a rebuke to the president himself as his party eyes a suddenly more threatening midterm election season next year.

"The Democratic Party is back, my friends," said Democratic National Committee Chairman Tom Perez.

As Democrats celebrated, Republicans pointed fingers.

"Ed Gillespie worked hard but did not embrace me or what I stand for," Trump tweeted Tuesday night as he toured Asia, noting that the GOP won a handful of special elections earlier in the year. "With the economy doing record numbers, we will continue to win, even bigger than before!"

Despite the criticism, Gillespie did, in more ways than one, embrace what Trump stands for, even if he didn't welcome Trump into the state to rally voters on his behalf.

The Republican president played a marginal role in Virginia, largely because Republicans on the ground did not want him there, a state he lost last fall, as his approval ratings hover near record lows. The White House instead dispatched Vice President Mike Pence to help Gillespie, although Trump promised Gillespie would "make America great again" in a recorded phone message that went to voters on the election's final day.

Gillespie, a former aide to President George W. Bush and GOP presidential nominee Mitt Romney, largely reinvented himself as Election Day neared by adopting many of Trump's racially-tinged nationalist positions. Gillespie warned of the dangers of the Hispanic street gang, MS-13, and highlighted its motto, "Kill, Rape, Control" in a television ad. The New Jersey native vowed to protect Confederate monuments. And he condemned the national anthem protests by NFL players, the vast majority of them black.

In the days before the election, former Trump chief strategist Steve Bannon said Gillespie's embrace of "Trumpism" offered a roadmap for GOP candidates nationwide heading into the 2018 midterm elections. Bannon did not respond to a request for comment late Tuesday.

Liberal activists cheered their successes as evidence of the anti-Trump energy on the ground nationwide they have long insisted was real, despite poor results in special elections in deep-red Montana, Georgia and South Carolina.

"This is the first fair fight we've had. The special elections that we've had so far have been incredibly slanted to the conservative side," said Ezra Levin, co-founder of the liberal group Indivisible, which had hundreds of volunteers and a handful of paid staff on the ground in Virginia. "There is a wave building. And 2018 is just around the corner."

New Jersey Democratic Sen. Cory Booker, among several Democrats weighing a presidential bid in 2020, cast his party's gubernatorial victories in New Jersey and Virginia as "the very first statewide rebuttal of the Trump administration."

"We will not succumb to the politics of fear," Booker declared.

The day also exposed deepening regional divisions between America's two major political parties.

Democrats appeared to pick up one state Senate seat in Washington state, which would flip control of the state legislature from Republicans to Democrats. That would mean Democrats now control every governor's office and state legislature on the West Coast. While Democrats also control a cluster of state governments in the Northeast, Republicans, however control state legislatures across the entire South, all but one state in the Midwest and the vast majority of the mountain West.

Excited Democrats hope to flip control of several state houses next year just as state leaders prepare for the once-in-a-decade task of resetting congressional boundaries, a process known as redistricting.

Inside the hotel ballroom where Gillespie gave his concession speech, Republicans Elsa Smith and Mario Leon wondered aloud whether Trump's white nationalist message was the best way forward. Both said the GOP could have won the Virginia contest if the party had attracted a more diverse coalition.

"The Republican Party needs more diversity — more Latinos, more blacks and more young people," said Mario Leon, 70, a satellite systems dealer from Henrico who is of Cuban descent.

Elsa Smith, 66, and the owner of a Spanish translation business who lives in Midlothian, said the party has to do more outreach to succeed: "We are not taking care of the demographics the way we should."

___

Peoples reported from New York. AP writers Michael Catalini in Asbury Park, New Jersey, Ben Finley in Richmond and Matthew Barakat in Fairfax contributed to this report.