London (CNN)Sadiq Khan, a practicing Muslim and Labour Party politician, has been elected mayor of London, marking a political milestone in the Western world.
Londoners voted in Khan, 45, as the first Muslim mayor of a major Western capital city. He will take office in a metropolis where his fellow Muslims comprise about 12% of the population.
His victory followed an unusually bitter campaign against Conservative candidate Zac Goldsmith, the son of a billionaire, in which race and religion have proven ugly flashpoints.
The London-born son of Pakistani immigrants, Khan grew up with his six brothers and sister in a three-bedroom, public housing apartment.
He studied law, became a university lecturer and the chairman of a civil liberties group, and was elected to Parliament in 2005.
Affordable housing in a city increasingly drawing the super-rich, aging infrastructure and transportation are top issues facing the new mayor.
Khan is replacing incumbent Boris Johnson, a colorful and popular figure who took office in 2008 and was a rare Conservative mayor in the Labour-leaning British capital.
Johnson is leading the campaign for Britain to leave the European Union at a referendum on June 23.
He is clashing with Prime Minister David Cameron, who is in favor of the United Kingdom remaining.
The London race was one of several in the United Kingdom on Thursday.
Voters also elected candidates for mayoral positions, local council seats, and parliamentary and assembly seats in Scotland and Wales.
The Scottish National Party — which campaigned for Scotland to leave the UK in 2014 — won more Scottish Parliament seats than any other party, but failed to secure an outright majority.
Labour plunged to third, behind the Conservatives — a result that would have seemed unimaginable several years ago in the former Labour stronghold.
In Wales — like Scotland, a traditionally left-leaning part of the country — Labour retained its place as the largest party. But the pro-Brexit, anti-immigration UK Independence Party (UKIP) picked up its first seats there.