Republican presidential candidate Donald Trump, who has called for a temporary ban on Muslims entering the United States, suggested he would make an exception for London's newly elected Muslim mayor, the New York Times reported.

However, Sadiq Khan who was sworn in as mayor of the British capital on Saturday, dismissedTrump's response, saying the real estate billionaire and presumptive Republican nominee had an "ignorant view of Islam".

"There will always be exceptions," the Times on Monday quoted Trump as saying when asked how his controversial proposal would apply to Khan, the son of a Pakistani immigrant bus driver and a seamstress.

Trump said he was happy to see Khan elected, the Times reported, adding: "You lead by example, always lead by example. If he does a good job ... that would be a terrific thing."

Trump put forth the idea of the ban after deadly attacks by Islamist militants in Paris and California last year. Muslim and human rights groups, Trump's Democratic rivals and many of his Republican presidential opponents condemned the proposal as divisive, counter-productive and contrary to American values.

Khan said Trump's view risked alienating mainstream Muslims and played into the hands of extremists, making both Britain and the United States less secure.

RELATED: Trump's Islam comments draw attacks from Republicans

"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," he said in a statement on Tuesday.

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

Khan, 45, a candidate from the opposition Labour Party, defeated his Conservative rival by a record margin last week to secure the biggest individual mandate in British political history after an acrimonious campaign.

After his victory, he accused his opponents of using fear and innuendo about his alleged links to extremists to turn ethnic and religious groups against each other, which he described as "something straight out of the Donald Trump playbook".

In an interview with Time magazine, Khan said he wanted to go to the United States to see the interesting programmes the mayors of New York and Chicago were implementing, but that he would have to visit before January in case Trump won the Nov. 8 election.