Sadiq Khan looks set to be London Mayor as well as Labour's lone bright spot in local elections

Labour's London Mayoral candidate Sadiq Khan and member of Parliament for Tooting walks through East Street Market in Walworth on May 4, 2016 in London, England.
Rob Stothard | Getty Images

Labour candidate Sadiq Khan looked set on Thursday to become the first Muslim elected mayor of London, loosening the ruling Conservatives' hold on Britain's financial center after a campaign marred by charges of anti-Semitism and extremism.

His expected victory may be a lone bright spot for Britain's main opposition party in local elections in England, Scotland and Wales. Opinion polls and voters suggested Labour would lose seats in some traditional strongholds, testing the authority of its new left-wing leader, Jeremy Corbyn.

Britons trickled in to voting stations to cast their ballots in elections that some campaigners fear could fail to attract many voters, as the contests have been overshadowed by next month's referendum on whether Britain should leave the European Union.

The fight to run London - the top prize in the local elections - has pitted Labour's Khan, 45, the son of an immigrant bus driver, against Conservative Zac Goldsmith, 41, the elite-educated son of a billionaire financier.

Goodbye Boris Johnson...
Goodbye Boris Johnson...

The winner will replace Conservative Boris Johnson, who has run the city of 8.6 million people for eight years. A top campaigner for Britain to leave the EU, Johnson is seen as a contender to succeed David Cameron as party leader and prime minister.

And while the mayor does not run the City of London financial district, the post has outsized influence over government in lobbying for the capital and the ruling Conservatives are keen to keep hold on to it.

Khan has a big lead in the opinion polls, despite accusations by Goldsmith that he has shared platforms with radical Muslim speakers and given "oxygen" to extremists.

"Yes, Goldsmith's argument on the radio made me distrust him...I am absolutely amazed how he tried to smear by innuendo," said self-employed voter Ian Whisson, describing the Conservative candidate's campaign as "disgusting and slimy".

British will vote to stay in the EU: Alastair Campbell
British will vote to stay in the EU: Alastair Campbell

Goldsmith denies the charge, saying he has raised legitimate questions over his opponent's judgment.

The campaign, condemned by Labour for using what it calls tactics worthy of presumptive U.S. Republican presidential nominee Donald Trump to divide Londoners along faith lines, has swept aside the usual concerns in the capital over high transport costs and a lack of affordable housing.

Heated campaign

Khan says he has fought extremism all his life and that he regrets sharing a stage with speakers who held "abhorrent" views. But the former human rights lawyer has also had to distance himself from Corbyn after a row over anti-Semitism.

The Labour leader ordered an inquiry into charges of anti-Semitism after suspending Ken Livingstone, a political ally and a former London mayor, for saying Adolf Hitler had supported Zionism.

London Mayor slammed after he calls Obama 'part-Kenyan'

But many voters said they had become disenchanted with a party which seems to slip from crisis to crisis under Corbyn, elected party leader in September on a wave of enthusiasm for change and an end to 'establishment politics'.

In Scotland, where Labour led the devolved government until 2007, voters going to the polls said the left-wing leader had done little to prompt a revival in the party's fortunes.

Susan Williamson, a 57-year-old care worker, said she had voted for the Scottish National Party leader, Nicola Sturgeon, who led her party to a sweeping victory in a British parliamentary election in 2015.

"I come from a working class family and we tended to vote for Labour in the past," she said, speaking in Scotland's capital Edinburgh.

"But there just aren't good vibes coming out of Jeremy Corbyn for the Labour Party. I just don't think he can man up enough to lead the government."

Follow CNBC International on Twitter and Facebook.