Democratic candidate Zohran Mamdani has won the New York City mayoral election, defeating independent contender and former Governor Andrew Cuomo, who was backed by President Donald Trump and tech entrepreneur Elon Musk, as well as Republican nominee Curtis Sliwa.