The new Mayor of London Sadiq Khan has launched a scathing attack on Prime Minister David Cameron and defeated mayoral Conservative candidate Zac Goldsmith for employing Donald Trump-style tactics in the race for City Hall. Khan accused the pair of setting out to divide ethnic communities in the capital in a bid to win votes.

"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," the Labour leader of London wrote in The Observer. "Londoners deserved better and I hope it's something the Conservative party will never try to repeat," he added.

Over the course of the mayoral campaign, Khan was subjected to repeated attempts by his rivals to portray him as an Islamic militant and his judgement was called into question for sharing speaking platforms with alleged extremists. The approach drew strong criticisms from across the board, including from within the Tory camp.

Former Conservative Party chair Baroness Sayeeda Warsi branded it an "appalling" campaign which ultimately "lost us the election, our reputation and credibility on issues of race and religion".

Outgoing Tory deputy mayor Roger Evans aired concerns that the campaign would leave a "negative legacy", while Labour MP Diane Abbott called it "the most appallingly anti-Muslim campaign" she had seen.

No racism, just 'rough and tumble'

However, Chancellor George Osborne defended the Tory strategy, dismissing the accusations of racist campaigning by saying "rough and tumble" is part and parcel of the electoral process.

"Politics is a robust thing in a democracy. Elections… there's a lot of rough and tumble," Osborne said on ITV's Peston on Sunday show.

"I went campaigning with Zac, there was a positive campaign there, obviously it didn't work in the end," added Osborne. "Of course he's got a future. He's a brilliant MP for Richmond."

Khan's view could not have been more different to that of the chancellor. "I was disappointed that the Conservatives party chose to have a campaign that was nasty, negative and divisive," he told The Andrew Marr Show.

"I have spent my entire life encouraging minority communities to get involved in civil society, in mainstream politics. I've been fighting extremism and radicalisation all my life," he added. "You should conduct [politics] in a positive way to enthuse people to get involved."

Khan defeated Goldsmith to succeed Boris Johnson, ending eight years of Tory leadership at City Hall. Khan garnered 1,310,143 votes, compared to Goldsmith's 994,614. The capital saw a 45.6% voter turnout – the largest ever.