Sadiq Khan, the son of an immigrant bus driver, has become the first Muslim to be elected mayor of a major Western city after winning the contest to lead London.

The official announcement was made early Saturday morning local time, but Khan led in polls against his main Conservative rival Zac Goldsmith. Khan won 1,310,143 votes, or 56.8 percent, beating Goldsmith, who got 994,614 votes.

In a speech after the announcement, Khan said he was “humbled” by the result and promised “to always be a mayor for all Londoners.”

Khan acknowledged the bitter contest, which was marred by allegations of extremism and fear-mongering.

“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. He added, “politics of fear is not welcome in our city.”

Goldsmith congratulated Khan in a statement Saturday and said “I wish him well.”

Related: London Mayoral Election Between Khan, Goldsmith Captivate Pakistan

Khan, 45, was a favorite to replace flamboyant Conservative Boris Johnson as mayor. Opinion polls had put him far in the lead, with a 20 point advantage over Goldsmith, a Conservative and the son of a billionaire.

Johnson said Saturday: “Many congratulations to Sadiq on securing a huge mandate to do the best job in British politics. I wish him every possible success and will be calling him in the morning.”

Khan’s victory makes him London’s first Muslim mayor and breaks the Conservatives’ eight-year hold on City Hall.

Labour leader Jeremy Corbyn tweeted his congratulations hours before the official announcement, adding the hashtag “YesWeKhan” in a play off U.S. President Barack Obama’s campaign slogan.

New York Mayor Bill de Blasio also sent his congratulations, calling Khan “London’s new mayor and a fellow affordable housing advocate.”

Khan is the son of a bus driver from Pakistan and grew up with seven siblings in a three-bedroom government-subsidized apartment. He resonated in an expensive city where rocketing rents and property values are squeezing out even middle-class workers.

Khan, a former human rights lawyer, has promised to be “the British Muslim who takes the fight to the extremists.”

Goldsmith has for weeks focused on Khan’s past career as a human rights lawyer that included public appearances alongside radical Muslim speakers, accusing Khan of giving “platform, oxygen and cover” to extremists

Khan accused Goldsmith of running a “nasty, dog-whistling campaign.”

The bruising election drew comparisons to the contentious U.S. presidential campaign.

Khan is among the majority of London’s 8.2 million inhabitants not classified as “white British.” According to the 2011 census, one in eight Londoners is a Muslim and 35 percent of the British capital’s residents were born overseas.

Tony Travers, a local government expert at the London School of Economics called Khan’s election a “remarkable step.”

“The majority of people who voted for him will not have been Muslims,” Travers said. “So that does suggest that despite all the challenges of being a Muslim in the West, a city like London sort of shrugs its shoulders and says, ‘He’s a mainstream politician.'”

Image: London Mayoral Election Count

Image: London Mayoral Election Count

In spite of Khan’s outright victory, Paul Golding, the mayoral candidate for the far-right Britain First party turned his back on the winner on stage after the results being announced. Golding won less than 2 percent of the vote.

Khan has spoken of his gratitude that his family had a secure, affordable home when he was growing up — something he fears younger Londoners are increasingly denied, in a city where market-rate rents and property prices have soared and local authorities build little social housing.

He says he’ll make housing his priority as mayor, building 50,000 new homes a year and giving locals “first dibs” on some new properties.