Maya Friedson, 18 and voting for the first time, was even more blunt in explaining why she had voted for Ms. Biaggi. “Because Jeff Klein is a member of the I.D.C.,” she said.
Also potentially harmful to Mr. Klein was the barrage of negative headlines in recent months, including an accusation of sexual misconduct against him and a state Board of Elections finding of improper campaign financing.
The challengers’ victories boosted the emerging progressive narrative that the old political model — buying expensive television ads, cozying up to real estate, corralling union support — had been displaced by vigorous grass-roots organizing.
Each challenger outspent his or her opponent on Facebook advertisements, sometimes by a huge margin. Ms. Biaggi and her allies spent between $14,500 and $93,800 on Facebook ads since the website’s online archive launched in May, while Mr. Klein and his supporters spent between $2,400 and $14,796. The challengers also recruited volunteers to fan out across their districts and knock on doors.
Ms. Salazar adopted similar tactics against Mr. Dilan, who although he was not a member of the I.D.C. was successfully cast as another out-of-touch corporate Democrat who had not fought sufficiently for tenants’ rights and other working class issues. The Democratic Socialists of America, of which Ms. Salazar is a member, deployed its full organizing power for her in Brooklyn, and she, like some of the I.D.C. challengers, was boosted by the high-profile support of Ms. Ocasio-Cortez.
A string of negative headlines about her in the final weeks of the campaign — suggesting that she had misled reporters and voters about her immigration status, religious background or socioeconomic status — seemed to have had little impact.
Still, there are geographic limitations to the grass-roots organizing model, said Lina Newton, a political-science professor at Hunter College, who observed that Ms. Nixon had deployed similar tactics to no avail on a statewide level.