The son of a Pakistani bus driver, Sadiq Khan was confirmed as London’s new mayor on Saturday after a bruising election campaign.
Khan, 45, will be the first Muslim to lead a major western capital.
His election secured a much-needed win for his opposition Labour Party amid mixed results in local elections and saw off a Conservative rival who attempted to link Khan to extremism.
“This election was not without controversy and I am so proud that London has today chosen hope over fear and unity over division,” Khan said in his acceptance speech.
“Fear does not make us safer. It only makes us weaker. And the politics of fear is simply not welcome in our city.”
The mayoral vote pitted Khan, who grew up in public housing in inner city London, against Conservative Zac Goldsmith, 41, the son of a billionaire financier.
Khan held his lead in the opinion polls, despite accusations by Goldsmith that he had shared platforms with radical Muslim speakers and given “oxygen” to extremists.
Khan, a former human rights lawyer, says he has fought extremism all his life and that he regrets sharing a stage with speakers who held “abhorrent” views. The Labour Party accused Goldsmith and the ruling Conservative Party of a smear campaign.
Even Goldsmith’s sister Jemima appeared to disapprove of his campaign, once the results were announced.
Zac Goldsmith's sister just publicly condemned her brother's mayoral campaign https://t.co/3pWKrMnRDx— The Independent (@Independent) 6 mai 2016
Goldsmith insisted he had raised legitimate questions over his opponent’s judgement.
In a long-delayed result, Khan’s win was confirmed shortly after midnight on Saturday inside London’s futuristic glass and steel city hall. His 13.6 percent margin of victory over Goldsmith was the widest in a London mayoral election in 16 years.
It goes some way to soothing the wounds of leader Jeremy Corbyn’s opposition Labour Party which suffered losses in other local elections this week.
Plaudits for Khan flooded in from as far afield as New York, whose mayor Bill de Blasio said on Twitter: “Sending congratulations to London’s new mayor and fellow affordable housing advocate, @SadiqKhan.”
Sending congratulations to London's new Mayor and fellow affordable housing advocate, @SadiqKhan. Look forward to working together!— Bill de Blasio (@BilldeBlasio) 6 mai 2016
Labour MP Khan replaces the flamboyant Conservative Boris Johnson, who ran the city of 8.6 million people for eight years.
Elsewhere, in elections for the devolved Scottish parliament, Labour lost a string of seats, ending up in third place behind Britain’s ruling Conservatives in what was once a traditional Labour heartland.
Prime Minister David Cameron hailed an historic result for his Tories.
But the real winners north of the border were Nicola Sturgeon’s SNP Scottish Nationalists, celebrating a third successive election victory, albeit just short of an overall majority. They will now form a minority government.