NEW YORK — Zohran Mamdani had a significant lead over former Gov. Andrew Cuomo in New York City’s Democratic mayoral primary Tuesday night, leaving the young liberal upstart poised to land a stunning upset in a race still to be determined by a ranked choice count.

Cuomo, who was trying to make a comeback from a sexual harassment scandal, conceded the contest less than two hours after the polls closed, saying he had called Mamdani to congratulate him.

“Tonight is his night. He deserved it. He won,” Cuomo told supporters.

The race’s ultimate outcome will be decided by a ranked choice tabulation after neither Democrat got a clear majority in the vote. Mamdani, 33, a democratic socialist member of the state Assembly, held a significant lead with about 90% of ballots counted. Mamdani was also ranked second on more ballots than Cuomo, narrowing Cuomo’s path to catch up. As news broke of Cuomo’s concession, Mamdani supporters erupted into the chorus from “Na Na Hey Hey Kiss Him Goodbye.”

— The Associated Press