Sadiq Khan has criticised Donald Trump for suggesting he would exempt him from his proposed temporary ban on Muslims entering the US, adding his comments play “into the hands of extremists”.

It comes after Mr Trump, the presumptive Republican presidential candidate, said he was happy to see London’s new Muslim mayor elected, saying it could be "very, very good".

The billionaire property mogul caused international outrage when he called for the temporary ban after the November 2015 Paris attacks. David Cameron labelled the idea "stupid" and calls to ban Mr Trump from entering Britain were raised in Parliament after a petition attracted nearly 600,000 signatures.

“This isn’t just about me – it’s about my friends, my family and everyone who comes from a background similar to mine, anywhere in the world,” Mr Khan said.

“Donald Trump’s ignorant view of Islam could make both our countries less safe – it risks alienating mainstream Muslims around the world and plays into the hands of the extremists.

“Donald Trump and those around him think that western liberal values are incompatible with mainstream Islam - London has proved him wrong.”

10 of the scariest things Donald Trump has ever said

Asked by the New York Times how the ban would affect London’s new Muslim Mayor, Mr Trump said there would "always be exceptions".

After being declared winner of the mayoral race on Saturday, Mr Khan said he rejected the "politics of fear" as he promised to be a "Mayor for all Londoners".

Commenting on the election, Mr Trump said: "I was happy to see that. I think it's a very good thing, and I hope he does a very good job because frankly that would be very, very good."

Sadiq Khan's 5 most significant policies Show all 5 1 /5 Sadiq Khan's 5 most significant policies Sadiq Khan's 5 most significant policies Tackle the housing crisis Khan’s key policy is an ambitious target to make 50 per cent of all new homes being genuinely affordable, and improving conditions for people renting Getty Images Sadiq Khan's 5 most significant policies Freeze transport fares Khan says he will freeze London transport fares for four years and introduce a one-hour bus ‘Hopper’ ticket, paid for by making TfL more efficient and exploring new revenue-raising opportunities. He claims Londoners won’t pay a penny more for their travel in 2020 than they do today Getty Images Sadiq Khan's 5 most significant policies Make London safer Resore neighbourhood policing, tackle gangs and knife crime, and a new plan to tackle the spread of extremism, and a review of the resourcing of our fire service Getty Images Sadiq Khan's 5 most significant policies Restore London's air quality Pedestrianise Oxford Street and prioritise measures to improve London’s air quality Getty Images Sadiq Khan's 5 most significant policies Make cycling and walking safer More segregated cycle routes with a promise to spend money improving dangerous junctions Getty Images

Asked to explain, he added: "Because I think if he does a great job, it will really – you lead by example, always lead by example. If he does a good job, and frankly if he does a great job, that would be a terrific thing."

Mr Khan told Time magazine earlier this week that he was confident Mr Trump's approach to politics would not prevail when America goes to the polls in November.

He warned: "I want to go to America to meet with and engage with American mayors. If Donald Trump becomes the president I'll be stopped from going there by virtue of my faith, which means I can't engage with American mayors and swap ideas."