LONDON: London's new Muslim mayor Sadiq Khan accused Prime Minister David Cameron on Sunday of using "Donald Trump playbook" tactics to try to divide communities in a bid to prevent his election.

READ MORE: The CSS sisters

The day after being sworn in with a promise to be "mayor for all Londoners", the Labour lawmaker condemned Cameron's Conservatives for trying to link him to Islamic extremists during the election campaign.

"They used fear and innuendo to try to turn different ethnic and religious groups against each other ? something straight out of the Donald Trump playbook," Khan wrote in The Observer newspaper. "Londoners deserved better and I hope it's something the Conservative party will never try to repeat."

Khan won 57 per cent of the vote in Thursday's mayoral election, securing 1.3 million votes to see off multimillionaire Tory Zac Goldsmith and making history as the first Muslim mayor of a major Western capital.

The 45-year-old, the son of a Pakistani immigrant bus driver, hailed his victory as a triumph of "unity over division" after weeks of Tory criticism over his past appearances at public events alongside radical Muslims.

A number of Conservative politicians criticised the tone of the campaign, but Defence Secretary Michael Fallon said the questions raised had been legitimate.

Khan had admitted representing some "pretty unsavoury characters" during his previous job as a human rights lawyer but said their views were "abhorrent".

"Both candidates were asked questions about their backgrounds, their personalities, their judgement, the people they associate with," Fallon told BBC radio. "That's the nature of our democracy and the rough-and-tumble of politics."