RICHMOND — Former Virginia governor Terry McAuliffe won the race for the Democratic nomination for governor Tuesday night, pulling away early from four rival candidates to win every city and county in the state as he pursues a second term in office.

Faced with a historically diverse set of choices, many voters expressed a pragmatic desire for a nominee who would have the best chance of winning in November against Republican candidate Glenn Youngkin, a former private equity executive selected in a GOP convention last month.

McAuliffe, who served from 2014 to 2018, seemed to fit that bill as a popular former governor who might have run for a second consecutive term except that the Virginia Constitution prohibits governors from doing so. He is also a prodigious fundraiser, an ability that will probably be put to the test against Youngkin, a multimillionaire who could spur the most expensive gubernatorial race in the history of the commonwealth.

Reports of light in-person turnout in some polling places raised questions about enthusiasm for a Democratic Party that no longer has Donald Trump as a foil in the White House, and some voters expressed less interest in down-ticket nominees. Incomplete results suggested that overall turnout was comparable to that of the Democratic primary in 2017.

Del. Hala S. Ayala (Prince William) took the nomination for lieutenant governor over six rivals. For attorney general, two-term incumbent Mark R. Herring won the nod over Del. Jerrauld C. “Jay” Jones (Norfolk).

The resulting ticket features all candidates from Northern Virginia (Herring is from Loudoun County) and two White men at a time when Democrats in Virginia and nationwide have pushed for greater roles for Black women.

The nomination of Ayala — who is of Afro-Latina, Lebanese and Irish descent — to run for lieutenant governor against Republican Winsome E. Sears, who is Black, ensures that Virginia will elect a woman of color to statewide office for the first time.

With Republicans nominating Cuban American Del. Jason Miyares (Virginia Beach) for attorney general, the GOP ticket is both geographically and ethnically more diverse than the Democratic slate. Youngkin was born in Richmond, moved to Virginia Beach as a teen and lives in Northern Virginia; Sears lives in Winchester.

McAuliffe declared victory at a hotel in Tysons alongside much of Virginia’s Democratic leadership, including Gov. Ralph Northam, House Speaker Eileen Filler-Corn (Fairfax) and Senate President Pro Tempore Louise Lucas (Portsmouth).

“Together, we can do this. We can lift everybody up, create jobs, lower health-care costs, build the best, most equitable education system in the country,” McAuliffe said in remarks that shifted from upbeat oratory to dark warnings about Youngkin.

McAuliffe said Youngkin would drive businesses away from Virginia, becoming a “job destroyer,” by concentrating on divisive social issues. The Republican is a vocal abortion foe and has recently taken up the cause of a Loudoun public school teacher who said he would not use preferred names or pronouns for transgender students.

Pledging to work with “reasonable Republicans,” McAuliffe said that label did not apply to Youngkin, whom he repeatedly tied to Trump.

“Glenn Youngkin, literally, folks, has one policy, one — an election integrity plan based on Donald Trump’s conspiracy theory about the 2020 election,” he said.

Youngkin reacted to McAuliffe’s nomination on social media, posting a statement thanking the five Democrats who ran but noting that “we differ mightily as to how to best serve Virginians.” He said he welcomes McAuliffe “to the race and look forward to presenting our competing ideas for Virginia’s future.”

But Youngkin switched quickly to a dark message of his own, warning that McAuliffe “will default to the same political games he’s played his entire life. I’m confident that voters will not choose a recycled, 40-year political insider and career politician who pretends to be a businessman, who talks big but doesn’t deliver, and who failed Virginians the first time he was governor.”

The exchange of rhetoric capped a hot, sunny day in which polling places in various regions saw medium to sparse crowds of voters, even compared with the usual low turnout expected for a primary. Whether that was because many early voters had already cast ballots was the crucial question for Democrats seeking to extend the gains they made during a Trump administration that kept their party fired up for four years.

“This is terrible, terrible,” Matthew McKeon, chief elections officer at the Ingleside Recreation Center in Norfolk, said midday Tuesday as turnout was running unexpectedly low.

“It’s a bit anticlimactic,” said Julie Waters, precinct chair for the Fairfax County Democratic Committee, as she sat alone in a tent outside McLean High School without a voter in sight. But, she added, “I’m not worried. This is what we expected.”

Virginia is one of only two states electing a new governor this year; the other is New Jersey. The results of the Old Dominion’s gubernatorial race could set the tone for the national political landscape heading into the 2022 midterm elections, political analysts say.

“Has this blue wave been fueled entirely by Trump, or is there something more long lasting that drives Democratic turnout?” said Rich Meagher, a political scientist at Randolph-Macon College.

Many voters who showed up at the polls said they were intrigued by the Democrats’ diverse slate of candidates but felt drawn to McAuliffe because of his track record.

“He’s the one I am familiar with,” said Juan Alvarez, 57, who voted at Langley High School in McLean.

Steven Straughn, 57, agreed, saying McAuliffe “was good for us last time.”

McAuliffe is hoping to become only the second Virginia governor since the Civil War to win two terms. He led in fundraising and endorsements against an array of competitors in the primary: former delegate Jennifer Carroll Foy (Prince William) and state Sen. Jennifer L. McClellan (Richmond), both of whom sought to become the first Black woman elected governor of any state; Lt. Gov. Justin Fairfax, only the second African American elected statewide in Virginia; and Del. Lee J. Carter (Manassas), a self-proclaimed socialist.

Even before the primary, McAuliffe had looked past those rivals and been campaigning against Youngkin, a political newcomer who has been endorsed by Trump.

Princess Blanding, whose brother Marcus-David Peters was killed by Richmond police during a mental health crisis in 2018, is also running for governor as a third-party candidate.

Voters also cast ballots for nominees in 27 contests for House of Delegates races, many of them Democratic primaries that pit more moderate incumbents against challengers to their left.

Turnout was difficult to assess Tuesday evening. A sizable wave of voters had cast ballots early — more than 118,000, or at least four times the number of early voters in the 2017 primary, according to the nonpartisan Virginia Public Access Project.

However, the General Assembly passed laws last year that greatly expanded early voting, so those numbers are tough to compare.

One detail suggested McAuliffe’s strength compared to the rest of the field: running against four opponents, he amassed almost the same number of votes — roughly 300,000 — as Northam won in his primary against a single rival four years ago.

Some poll workers at Mary Munford Elementary School in Richmond speculated that turnout might actually be up this year. They said Election Day voting seemed comparable to four years ago, while early voting numbers were up sharply statewide.

“All my friends voted early. I was late,” Robert Bayless, 70, a retired certified public accountant, said after casting his ballot at the school. Bayless said he voted for the “incumbents,” by which he meant McAuliffe and Herring.

Bayless also picked Ayala for lieutenant governor, in large part because Ayala had the backing of the Virginia branch of the National Organization for Women and Northam.

At Mount Vernon Recreational Center in Alexandria, a trickle of late afternoon voters sneaked past the candidates and their surrogates who stood near the entrance. Although turnout appeared to be low in other parts of the state, this precinct in the Del Ray neighborhood — according to some candidates, usually the busiest in Northern Virginia — seemed packed.

In a Ginter Park polling place on Richmond’s north side, poll workers reported a steady trickle of voters and said they were pleased by the turnout. More than 200 people had voted by a little past 2 p.m., they said.

But conditions were grim at Herndon Elementary School, where the sun beat down and cicadas were everywhere, landing on shirts, dresses and faces — possibly leading to a lower-than-expected turnout, with only 267 people showing up to vote by 4 p.m., election officials said.

To Leslie Johnson, it didn’t bode well for Democrats in November. After voting for McAuliffe, Herring and Ayala, she worried that apathy was taking hold in her party, setting up the Democratic ticket for an upset in the fall amid what she sees as a barrage of falsehoods coming from Republicans.

“There aren’t enough people who understand that this is the only way to make a change and they have to get off their rusty duffs,” she said. “I don’t care how hot it is. I don’t care how tired you are. This is the only way.”

In Norfolk, McKeon, the elections officer, was standing outside the rec center during the lunch hour and no one was in line. By 12:30 p.m., just 149 people had voted in person, adding to the 130 who had voted early. The numbers were unusually low for a city where nearly 90,000 people voted in the 2020 presidential election, McKeon said.

“This is a very high-turnout precinct,” he added. “But a lot of my neighbors I didn’t see today.”

Many who came out to vote said they were motivated by a sense of urgency. At Langley High, Gwendolyn Ware, 58, picked Carroll Foy for governor, pointing to her desire to “make a difference for all.”

“Sometimes people of color are left out. She wants to make a difference for everybody,” said Ware, who, like Carroll Foy, is Black.

Vickie Stangl, a self-described feminist and longtime professor of women’s history, said she also considered voting for Carroll Foy but worried that she might not be able to beat Youngkin, who she associates with Trump. Breaking her habit of voting for women, she chose McAuliffe.

“I wanted to go with the sure bet,” she said. “I can’t believe I’m saying that.”

At Derbyshire Baptist Church in Henrico County, Betty Oliver, 65, said it was similarly her dislike of Youngkin that drove her to pick McAuliffe. She has been aggravated by Youngkin’s stance toward Trump’s false claim that Democrats stole the 2020 election, she said, noting that he studiously declined to say whether President Biden had been legitimately elected until he secured the GOP nomination.

In McLean, Sophia Lynn said she liked both Carroll Foy and McClellan — whom she described as “highly motivated and talented.”

But she ultimately threw her support behind McAuliffe to take on Youngkin, echoing anxieties that other Democratic voters have expressed about keeping Virginia blue.

“This is a pragmatic decision,” said Lynn, 60. “In the post-Trump era, we Democrats have to make pragmatic decisions.”

Teo Armus, Michael Brice-Saddler, Rachel Chason, Jim Morrison, Rebecca Tan and Julie Zauzmer contributed to this report. Morrison reported from Norfolk. Armus, Brice-Saddler, Chason, Tan and Zauzmer reported from Washington.