Democratic presidential hopeful Beto O'Rourke participates in a roundtable discussion with local politicians Wednesday at a Tex-Mex restaurant in Dumfries. (Bill O'Leary/The Washington Post)

Democratic presidential candidate Beto O’Rourke came to Northern Virginia on Wednesday to whip up enthusiasm for Virginia’s General Assembly elections, hoping to re-energize blue voters buffeted by scandals in Richmond.

During the final leg of a two-day state tour, the former Texas congressman said a Democratic takeover this fall of the narrowly divided state legislature would inspire voters around the country ahead of the 2020 presidential election — just as the state party’s victories in 2017 ignited enthusiasm for last year’s midterms.

“2019 sets the stage,” O’Rourke, 46, said during an appearance in Fairfax County with about 200 voters and Democratic officeholders and candidates. “The country rests on the shoulders of those here today. We want to do everything we can to help you by bringing attention and focus, within the commonwealth and from without, on the importance of these next elections.”

O’Rourke was the first presidential candidate to visit Virginia this year. His presence was a welcome distraction for a state party rocked by controversies over the use of blackface by Gov. Ralph Northam (D) and Attorney General Mark R. Herring (D) as young men and years-old sexual assault allegations facing Lt. Gov. Justin Fairfax (D).

Campaign finance disclosures this week revealed lackluster fundraising by those three officials. And former Virginia governor Terry McAuliffe on Wednesday cited the need to help candidates campaign at home as one reason he is forgoing a White House run.

O’Rourke, who earned a reputation as a prolific fundraiser during his losing 2018 challenge of Sen. Ted Cruz (R-Tex.), mostly sidestepped the scandals during nine stops in Virginia.

O'Rourke, a former Texas congressman, campaigns Wednesday in the backyard of a home in Alexandria as he made a series of stops in Virginia. (Erik S Lesser/EPA-EFE/Shutterstock)

At each appearance, he drew large, cheering crowds eager to take selfies. Some said they were curious to gain a deeper understanding of the youthful-looking, charismatic candidate, who alternated between English and fluent Spanish during his speeches and, at one point, high-fived an infant.

“I want to see more than flash,” said Deana Beyer, 73, of Dumfries.

Although O’Rourke has said he will target rural and disaffected voters who may have backed President Trump in 2016, his Virginia tour was concentrated in bluer parts of the state.

In Fredericksburg, about 50 miles south of Washington, he veered away from an earlier call for Northam to step down, saying the fate of both the governor and his deputy should rest in voters’ hands.

“These two men hold positions of public trust,” he said during a morning stop with Joshua Cole, a Democrat seeking to unseat Del. Robert M. Thomas Jr. (R-Stafford) in November. “They have both made their statements to the citizens of Virginia, and I think it should be up to the citizens of Virginia to make that decision.”

Students take videos with their cellphones as O'Rourke speaks Tuesday at the University of Virginia in Charlottesville. (Zack Wajsgras/Daily Progress/AP)

Republicans control the Virginia House of Delegates and the Senate, each by a two-seat margin. After historic gains two years ago, Democrats are hoping to win the majority this year.

For the most part, those who showed up Wednesday to hear what O’Rourke had to say agreed that the party needs to move past the scandals.

During a town-hall-style discussion in a Tex-Mex restaurant in Dumfries, the conversation ranged from the presidential hopeful’s plans for gun control to how to keep immigrant families from being separated at the U.S.-Mexico border and how to combat the effects of climate change.

In answer to a question about police shootings of unarmed African Americans, O’Rourke laid part of the blame on Trump, citing his rhetoric demonizing African Americans and immigrants and his recent retweeting of an inflammatory video suggesting that Rep. Ilhan Omar (D-Minn.) condoned the 9/11 terrorist attacks.

“It’s not just the rhetoric,” O’Rourke said. “It’s not just the words. It is the violence and the policies and the dehumanization and the torture that followed.”

Del. Hala S. Ayala (D-Prince William), who was at the Dumfries event, called O’Rourke’s appearance “an injection of enthusiasm.”

“We’ve had some bumps and bruises here,” Ayala said, referring both to the Democratic scandals in Richmond and to Trump’s policies. “But we’re ready for change.”

Some voters and party activists who have been trying to build early momentum for November said it has been a struggle this year. Cher Muzyk, 44, said voters at times were apathetic when she and other volunteers knocked on doors in search of support for local candidates.

“Whatever will inspire people to come out and vote, if that’s presidential candidates coming out to Virginia, I support it,” she said.

In Alexandria, Amaryn Clare, 66, was in a line with about 75 others waiting for the chance to take photographs with O’Rourke after he entertained questions about gun control, cybersecurity and immigration from a crowd of about 200 people gathered in a supporter’s sprawling backyard.

Clare said she likes O’Rourke but isn’t sure he or other presidential candidates who plan to visit the state can do enough to help Democrats overcome the stigma of the problems in Richmond.

The scandals “won’t deter me, because I’m too interested in making sure the state becomes Democratic,” she said. “But it does drain enthusiasm, unfortunately.”

Correction: A previous version of this article misspelled the first name of Del. Hala S. Ayala (D-Prince William).

Jenna Johnson contributed to this report.