London’s newly elected mayor, Sadiq Khan, has compared Prime Minister David Cameron and mayoral opponent Zac Goldsmith to Donald Trump over their “nasty” election campaign.

Khan, the candidate for Jeremy Corbyn’s anti-austerity Labour Party, accused both Conservative politicians of attempting to “turn ethnic communities against each other” and using tactics “straight out of the Donald Trump playbook,” the Guardian reports.

Khan, who was officially sworn into his new post Saturday, was apparently referencing Trump’s controversial anti-Muslim comments in an article he wrote for Sunday’s Observer newspaper.

Read more

Khan, who is Muslim, says he had hoped the mayoral campaign would focus on issues surrounding housing, transport and air pollution.

Instead, he says Cameron and Goldsmith attempted to win votes by dividing communities.

“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. Londoners deserved better and I hope it’s something the Conservative Party will never try to repeat,” he wrote.

Khan had earlier criticized the Conservatives of running a “really nasty campaign” in their bid to hold on to the London mayor’s post, held by Boris Johnson since 2008.

Cameron has yet to congratulate Khan on his electoral win, or even publicly acknowledge it.

Still no offer of congratulations to Khan from Cameron. How many hours passed before he congratulated Trump and said he deserved respect? — Daniel (@SuitablyManic) May 7, 2016

The new mayor’s comments echo criticism from senior Tories who broke away from their own party’s position to condemn the Conservative London campaign as divisive.

READ MORE: Muslim cleric branded ISIS supporter by Cameron demands apology

“I was disgusted with the tone of [Goldsmith’s] campaign and his repeated, and risible, attempts to smear Sadiq Khan… and paint [him] as a closet extremist,” wrote Chairman of the Conservative Muslim Forum, Mohammed Amin.

Cameron was accused of making racist comments about Khan for saying he “shared a platform” with extremists who support IS (Islamic State, formerly ISIS) during Prime Minister’s Questions ahead of the London vote.