While most of Alexandria’s attention was focused on its hotly contested mayoral race Tuesday night, two well-known City Council incumbents lost in the Democratic primary, an apparent result of recent controversies in which they were main players.

Paul Smedberg, a five-term council member who serves as the city’s representative on the Metro board, fell to 10th in a field of 12 candidates seeking the six nominations. Willie F. Bailey Sr., a first-term council member, came in seventh, according to unofficial results, falling more than 500 votes short of the Democratic nomination.

The voting populace was clearly restive, turning out in record numbers to oust Mayor Allison Silberberg in favor of Vice Mayor Justin Wilson and to choose four newcomers and two incumbents for Democratic nominations to the council.

The six winners will be heavily favored against two Republicans and an independent in the November general election. Wilson, the mayoral nominee, will be unopposed on the ballot.

If all the Democratic nominees win as expected, the council will be markedly younger than it is right now and for the first time would be composed entirely of women and people of color.

First-time council candidate Elizabeth Bennett-Parker, 32, a nonprofit entrepreneur, placed first among council candidates, with 13,879 votes, or 13.3 percent, according to unofficial returns.

She was followed by two-term incumbent John T. Chapman, who captured 12,176 votes, or 11.67 percent.

Newcomers Mo Seifeldein, 34, a lawyer and Sudanese immigrant; Canek Aguirre, 33, son of Mexican immigrants and president of the Tenant and Workers United board; and Amy Jackson, 47, a former teacher and civic activist, also won spots on the November ballot.

So did incumbent Redella S. “Del” Pepper, the 80-year-old dean of the council who has been in office since 1985.

Smedberg, 57, is second only to Pepper in longevity and is one of the first openly gay people elected to public office in Virginia. He was caught up in a controversy over the city’s loss of a south entrance to the planned Potomac Yard Metro station. Some Potomac Yard residents accused him of misleading them over the removal of one of the Metro entrances.

Smedberg and other city officials say they were barred for almost a year from telling the public about the potential loss of the entrance, because of Metro’s strict confidentiality rules during the procurement process.

After Metro published a drawing that showed only a single entrance to the station this spring, Smedberg, through his aide, wrote in emails to constituents that the drawing was “not correct nor are they final,” a public-records request released shortly before the primary showed.

The drawing was, in fact, accurate, which became clear when Metro announced the new design in early May.

Adrien Lopez, who filed the Freedom of Information Act request that exposed the emails, said her neighbors did not target Smedberg for defeat. But “he was the one who ended up writing it down,” Lopez said. “. . . He happens to be the guy on the spot. Nobody was going to vote for any members who weren’t open with us. We’re going to put in new people who tell us the truth.”

In the Potomac Yard precinct, Smedberg received only 53 votes, or 4.35 percent of those cast there. Overall, he won 7,767 votes, or 7.4 percent of the total.

Neither Smedberg nor Bailey returned calls for comment Wednesday morning.

Bailey, 54, is a battalion chief with the Fairfax County Fire and Rescue Department. He proposed and pushed through a 1 percent increase in the city’s meals tax to generate additional money for affordable workforce housing. The increase was vociferously opposed by local restaurateurs.