One tweet had a picture of London’s telecom tower with the comment: “The world’s tallest minaret calls the whole nation to prayer in the UK”.

Another carried an image of Queen Elizabeth II wearing a headscarf with the inscription: “Even the British monarch is now forced to wear a hijab”.

The anti-Trump petition was posted late on Tuesday by Scottish resident Suzanne Kelly, a long-time critic of the 69-year-old.

Six MPs have also signed a House of Commons motion calling on the government “to refuse a visa allowing Donald Trump to visit the UK until Mr Trump withdraws his comments”, saying they were “extremely divisive and will incite discrimination and hatred”.

Finance minister George Osborne told parliament that Trump’s comments “fly in the face of the founding principle of the United States”.

He said democratic debate was “the best way to deal with Donald Trump and his views rather than trying to ban presidential candidates”.

Another MP, Tulip Siddiq, said Trump’s remarks were “dangerous”. “I would say to him you are not welcome in our country in the same way that you want to ban people like me going into your country,” she told BBC radio.

Trump, the leading candidate for the Republican presidential nomination, called for a “total and complete shutdown of Muslims entering the United States until our country’s representatives can figure out what is going on” following recent attacks that left 14 people dead in California and killed 130 in Paris.

He later defended his comments on US network MSNBC, saying: “They have sections in Paris that are radicalised, where the police refuse to go. We have places in London … that are so radicalised that the police are afraid for their own lives.”

A spokeswoman for London’s Scotland Yard police headquarters said: “It’s important to state to Londoners that Mr Trump could not be more wrong”, adding that all US presidential candidates were welcome for a briefing “on the reality of policing London”.

London Mayor Boris Johnson dismissed Trump’s comments as “complete and utter nonsense” while a spokesman for Prime Minister David Cameron called the remarks “divisive, unhelpful and quite simply wrong”.

More than 17,000 had signed another petition, also launched by Kelly, calling on the Robert Gordon University in the Scottish city of Aberdeen to strip Trump of an honorary degree awarded in 2010.

Kelly is one of many Aberdeen residents and environmentalists opposed to Trump’s coastal golf course and hotel development outside the city, and a map of the government petition revealed a high number of signatories in the local area.

Scotland’s First Minister Nicola Sturgeon said Trump’s remarks on Muslims were “obnoxious and offensive, and have rightly been condemned by people across the political spectrum”.