Labour Party candidate for Mayor of London, Sadiq Khan
Labour Party candidate for Mayor of London, Sadiq KhanReuters

British Prime Minister David Cameron accused the Labour party's candidate for London mayor of associating with an alleged Islamic State group supporter Wednesday, spotlighting the dirty race to run Britain's capital.

Cameron's comments were aimed at Sadiq Khan, a Muslim former government minister and human rights lawyer who is favorite to win the May 5 mayoral election.

Khan, the son of bus driver and a seamstress who moved to Britain from Pakistan, is up against Zac Goldsmith of Cameron's Conservatives, whose father was a billionaire financier.

During Prime Minister's Questions in the House of Commons, Cameron accused Khan of appearing at events nine times alongside Sulaiman Ghani, a little-known imam based in the same part of south London as the Labour politician.

"If we are going to condemn not just violent extremism but also the extremism that seeks to justify violence in any way, it is very important that we do not back these people and we do not appear on platforms with them," Cameron said.

The prime minister added he was "concerned" about Khan and said of Ghani: "This man supports IS [Islamic State]."

Labour MPs shouted "racist" at Cameron, party leader Jeremy Corbyn called the comments "disgraceful" and a Labour source speaking anonymously said it "demeans the office of prime minister" to repeat such allegations.

Khan himself accused Cameron's Conservatives of running a "nasty, dog-whistling campaign that is designed to divide London's communities".

An unverified Twitter account in Ghani's name widely quoted by British media carried an update urging Cameron to "retract his comments", adding:

"This is defamation at its highest level."

Cameron cannot be sued for defamation because his comments are protected by parliamentary privilege.

The controversy brought the simmering tensions in the race to succeed Boris Johnson as the mayor of one of Europe's most ethnically diverse cities right to the heart of British politics.

Khan is tipped to win next month's election, in which the main issue is the soaring cost of housing.

An Opinium poll for the London Evening Standard newspaper this month gave Khan a clear lead with 35 percent of first preference votes compared to 27 percent for Goldsmith.

He admitted on BBC television this week that his work as a human rights lawyer and chairman of one of Britain's leading civil liberties groups had brought him into contact with some extremists.

"I regret giving the impression I subscribe to their views. I have been quite clear that I find their views abhorrent," Khan said.

Goldsmith's campaign, which did not immediately respond to a request for comment, has repeatedly sought to raise questions about his judgment.

Last month, it said in a campaign leaflet targeted at British Indians that Khan did not attend a rally for Indian Prime Minister Narendra Modi in London last year and that Labour supported a tax on family jewelry.

It has sought to tie him to Corbyn, Labour's socialist leader who swept to victory in a leadership contest last year on grassroots support but who is unpopular with centrist party figures.

Corbyn is a long-standing supporter of the Palestinian Authority and has met representatives of Islamist groups Hamas and Hezbollah.

Labour has separately faced allegations that it has failed to do enough about instances of anti-Semitism in the party.

Khan has told the Evening Standard that he is "embarrassed and sorrowful" about the issue.

The strategy of targeting Khan's judgment is risky, analysts say.

Professor Tony Travers, a politics expert at the London School of Economics (LSE), said that he was "clearly a modern, progressive Muslim" and that opponents risked a "backlash" by raising issues which touched on his religion.

AFP contributed to this report