Alexandria Vice Mayor Justin Wilson won the Democratic primary for mayor on June 12, 2018. (Patricia Sullivan/The Washington Post)

Alexandria Vice Mayor Justin Wilson defeated first-term Mayor Allison Silberberg on Tuesday in Virginia’s Democratic primary, all but ensuring that he will replace her in the city’s top political office after the November general election.

Wilson, 39, campaigned on a platform of more economic development and infrastructure investment and won by about 1,200 votes, according to unofficial returns, after the lead seesawed throughout the evening.

No Republican or independent had filed to run against him by the deadline, which was 7 p.m. Tuesday.

A large turnout in Wilson’s Del Ray neighborhood appeared to put him over the top. Across the city, voter turnout was high compared with previous mayoral primaries, with nearly 23 percent of registered voters casting ballots, according to unofficial estimates.

Wilson, who personally knocked on more than 2,000 doors across the city during the campaign, said he had expected a close race.

“There’s a real concern about how we protect the future, how we provide services our residents expect and demand,” he said, adding that Silberberg was “very gracious” when she called to concede about 9:15 p.m., he said.

Alexandria Mayor Allison Silberberg, right, lost the Democratic mayoral primary to Wilson, left, on June 12, 2018. (Patricia Sullivan/The Washington Post)

The two Democrats had clashed on the dais of Alexandria’s city council chambers for the past three years. Their differences were expressed in policy and personality.

Silberberg, who won support from residents by nearly always seeking neighborhood consent before supporting or opposing redevelopment projects, accused Wilson of distorting her record. Wilson, who built alliances on the council that thwarted Silberberg’s stances and blocked nearly all of her initiatives, said the mayor lacked leadership because she was often the lone “no” vote on land-use decisions.

They differed on major issues — including property tax increases and the timing of school construction — and on minor matters, such as how long to allow the public comment period to run at monthly council meetings, and whether to admonish city employees from the dais.

“It was a very close race, and I’m grateful to everyone who voted for me or who worked for me,” Silberberg said Tuesday night. “Their voices will continue to matter. It was the honor of my life to serve as mayor. . . . I’ll still be in office until January, and I’ll continue to work on a whole host of issues — greater transparency as well as environmental regulations and the tree canopy.”

Wilson’s supporters expressed confidence in him at polling stations on Tuesday.

Virginia primary election results 2018: Senate and House races

“Justin clearly has the leadership we need to move forward into the future, and Allison lacks that,” said Bill Hendrickson, who voted at George Washington Middle School Tuesday afternoon.

Steve Beggs, who voted at the Mount Vernon Recreation Center, said Wilson was “thorough, and he has good thought processes. He’s not afraid to say no, and he works his tail off.”

Guy Whitlock, who voted at fire department headquarters, said he did not like Silberberg’s long-standing opposition to redevelopment of the Alexandria waterfront.

Sally McCaffrey, who recently moved to Alexandria from Oakland, Calif., called Wilson “disrespectful” for his habit of texting while at council meetings rather than giving his full attention to speakers.

“I think our mayor did a good job, and I think our council gives her too many problems,” Silberberg voter Dianne Murphy said at the George Washington Middle School polling place. She was one of many voters who said they thought it was time to bring “new blood” to the city council.

The mayor, who has limited powers in Alexandria, will lead a city council that saw two incumbents — Paul Smedberg and Willie Bailey — lose in the primary.

Twelve candidates sought the six seats — two of the positions were open, because of Wilson’s mayoral bid and Timothy Lovain’s decision not to seek reelection.

According to unofficial returns, the top six finishers in the primary were Elizabeth Bennett-Parker, incumbent John Taylor Chapman, Mo Seifeldein, incumbent Redella “Del” Pepper, Canek Aguirre and Amy Jackson.

They will face at least two Republicans and one independent in November’s general election.

More than 1,900 voters, twice as many as three years ago, voted absentee in this year’s primary, said Alexandria voter registrar Anna Leider.

In nearby Arlington County, two newcomers sought the Democratic nomination to challenge incumbent John Vihstadt (I) for a seat on the Arlington County Board.

Matt de Ferranti, 44, decisively beat Chanda Choun, 30, according to unofficial results.

De Ferranti, 44, legislative director for the National Indian Education Association, had been endorsed by many Arlington elected officials. He promised to return the county’s government to its progressive roots by focusing on transit improvements, encouraging the construction of more affordable housing, strengthening the schools and preserving parks.

Choun, 30, a cybersecurity manager at a private technology firm, leaned heavily on his Cambodian immigrant roots and his Army service to argue that the county needed more youth and diversity on the board.