The result came early Saturday, more than 24 hours after polls closed.

Khan hailed his victory as the triumph of “hope over fear and unity over division.”

Khan was elected to replace Conservative Mayor Boris Johnson after a campaign marked by U.S.-style negative campaigning.

Goldsmith, a wealthy environmentalist, called Khan divisive and accused him of sharing platforms with Islamic extremists.

Khan, who calls himself “the British Muslim who will take the fight to the extremists,” accused Goldsmith of trying to scare and divide voters in a proudly multicultural city of 8.6 million people — more than 1 million of them Muslim.