Mayor Bill de Blasio won the Democratic mayoral primary in New York City on Tuesday night, defeating Sal F. Albanese, a former city councilman, and three other challengers. He'll compete against Nicole Malliotakis, a Republican assemblywoman, in the general election on Nov. 7.

Primary voters also chose among candidates for City Council, public advocate, and also district attorney in Manhattan and in Brooklyn.