Image copyright Getty Images

A petition calling for Republican presidential hopeful Donald Trump to be barred from entering the UK has gathered more than 370,000 names, so MPs will have to consider debating it.

The petition went on Parliament's e-petition website on Tuesday.

It was posted in response to Mr Trump's call for a temporary halt on Muslims entering the United States.

Chancellor George Osborne criticised Mr Trump's comments but rejected calls for him to be banned from the UK.

A counter-petition, set up on Wednesday, saying Mr Trump should not be banned as it would be "totally illogical" has attracted more than 9,000 signatures.

Any petition with more than 100,000 signatures is automatically considered for debate in Parliament.

Mr Trump is seeking the Republican nomination for next year's US presidential election.

He said on Wednesday he would never leave the 2016 race, despite the volume of calls for him to step aside.

In other developments:

'The signatories believe Donald J Trump should be banned from UK entry'

Trump claim that police 'afraid' in London is wrong, PM says

Donald Trump: Free speech v hate speech

How you can get banned from coming to the UK and why

Could Donald Trump be banned from the UK?

Labour home affairs spokesman Jack Dromey and Green Party leader Natalie Bennett have backed the petition to ban Trump from entering the country, with Conservative MP Sarah Wollaston saying the proposal merited "serious discussion"

The Home Office has powers to ban speakers from overseas coming to the UK under the "unacceptable behaviours or extremism exclusion policy"

Last year, Home Secretary Theresa May said she had excluded "hundreds" of people

People banned from entering the UK under the exclusion policy in recent years include leaders of the Westboro Baptist Church, Islamist preachers and Ku Klux Klan officials, and two anti-Muslim bloggers

Home Secretary Theresa May can exclude an individual if she considers their presence is "not conducive to the public good or if their exclusion is justified on public policy grounds".

Mr Osborne told the Commons that the remarks by Mr Trump flew in the face of America's founding principles and "were not welcome".

Downing Street said it was not aware of any plans for the billionaire businessman to visit, so any question of a ban on him coming to Britain was "hypothetical".

The full text of the petition - entitled "Block Donald J Trump from UK entry" - reads: "The UK has banned entry to many individuals for hate speech. The same principles should apply to everyone who wishes to enter the UK.

"If the United Kingdom is to continue applying the 'unacceptable behaviour' criteria to those who wish to enter its borders, it must be fairly applied to the rich as well as poor, and the weak as well as powerful."

In the US, the Pentagon has warned that Mr Trump's rhetoric on Muslims undermines US national security by boosting the Islamic State (IS) group.

On Tuesday, US Secretary of State John Kerry added to the widespread condemnation of Mr Trump's comments, saying they were "not constructive" in the fight against IS.

Image caption Labour MP Tulip Siddiq says Donald Trump is not welcome in the UK following his anti-Muslim comments

Mr Trump called for the ban on Muslims entering the United States following a mass shooting in San Bernadino, California.

A Muslim couple, believed to have been radicalised, killed 14 people at a health centre.

The prime minister's official spokeswoman has said David Cameron "completely disagrees with Donald Trump".

How petitions work

In 2011, the coalition government launched a new e-petition site, with the prospect of a debate if 100,000 signatures are reached.

Petitions which reach the required number of signatures are almost always debated in Parliament, but the government might decide not to put a petition forward for debate if the issue has already been debated recently or there is one scheduled for the near future. Petitions that pass 10,000 signatures receive a response from the government.

The petition is initially handled by the Petitions Committee, set up by the House of Commons and comprising up to 11 backbench MPs from government and opposition parties. Petitions can be rejected for a number of reasons, including for being about something that the UK government or Parliament is not responsible for, or is nonsensical.

Topics put up for petition have included the introduction of mandatory drugs tests for MPs, the full disclosure of all government documents relating to the Hillsborough disaster, and minimum prices for milk.

But while a Parliament debate is a good way to raise the profile of an issue with lawmakers, it does not automatically follow that there will be a change in the law. In 2015 there were 14 petitions debated in Parliament, but none directly brought about any change in UK laws.

Source: Petitions website

Are e-petitions a waste of time?

Labour's Tulip Siddiq, MP for Hampstead and Kilburn, also called for Mr Trump to be banned from the UK after he claimed that parts of London were "so radicalised" that police were "afraid for their own lives".

Mr Trump's comments about the UK capital previously led to London Mayor Boris Johnson saying "the only reason I wouldn't go to some parts of New York is the real risk of meeting Donald Trump".

He added: "Donald Trump's ill-informed comments are complete and utter nonsense.

"As a city where more than 300 languages are spoken, London has a proud history of tolerance and diversity and to suggest there are areas where police officers cannot go because of radicalisation is simply ridiculous."