Republican presidential candidate Donald Trump has called for a "complete shutdown of Muslims entering the United States", an idea that prompted one of his rivals to call him "unhinged".

The proposed ban would apply to immigrants and visitors alike, a sweeping prohibition affecting all adherents of Islam who want to come to the US. The idea also raised immediate questions about whether it could pass muster under constitutional protections of the free exercise of religion.

Mr Trump's campaign said in a statement that such a ban should stand "until our country's representatives can figure out what is going on". The statement added that the Republican frontrunner's proposal comes in response to a level of hatred among "large segments of the Muslim population" towards Americans.

"Until we are able to determine and understand this problem and the dangerous threat it poses, our country cannot be the victims of horrendous attacks by people that believe only in jihad, and have no sense of reason or respect for human life," Mr Trump said in the statement.

He added on Twitter: "Just put out a very important policy statement on the extraordinary influx of hatred & danger coming into our country. We must be vigilant!"

Mr Trump's campaign has been marked by a pattern of inflammatory statements and he kicked off his campaign with a speech in which he said some Mexican immigrants are rapists and criminals.

He recently drew criticism for retweeting an image of inaccurate statistics that vastly overrepresented the number of whites killed by blacks. But so far those and other errors of fact have not diminished his popularity among many Republican voters.

Since the Paris terrorist attacks, a number of Republican presidential contenders have proposed restrictions on Syrian refugees - with several suggesting preference for Christians seeking asylum - and tighter surveillance in the US.

But Mr Trump's proposed ban goes much further than those ideas, and his Republican rivals were quick to reject the latest provocation from a candidate who has delivered no shortage of them.

"Donald Trump is unhinged," Jeb Bush tweeted. "His 'policy' proposals are not serious."

Carly Fiorina said: "Trump's overreaction is as dangerous as President Obama's under-reaction."

John Kasich slammed Mr Trump's "outrageous divisiveness", while a more measured Ted Cruz, who has always been cautious about upsetting the tycoon's supporters, said: "Well, that is not my policy."

Trump campaign manager Corey Lewandowski said Mr Trump's proposed ban would apply to "everybody", including Muslims seeking immigration visas as well as tourists seeking to enter the country.

He did not respond to questions about whether it would also include Muslims who are US citizens and travel outside of the country, or how a determination of someone's religion might be made by customs and border officials.

There are, for example, more than 5,800 servicemen and women on active US military duty and in the reserves who self-identify as Muslim and could be assigned to serve overseas.

Mr Trump was also unclear on whether his ban would apply to Muslim allies in the fight against Islamic State militants.

Ari Fleischer, a former aide to Republican president George W Bush, tweeted: "Under Trump, the King Abdullah of Jordan, who is fighting ISIS, won't be allowed in the US to talk about how to fight ISIS."

Mr Trump has taken a particularly hard line against Muslims in the days since the Paris attacks, advocating enhanced surveillance of mosques due to fears over radicalisation.

His proposal comes a day after Barack Obama spoke to the nation from the Oval Office about the shootings in San Bernardino, California, which the president said was "an act of terrorism designed to kill innocent people".

The FBI said Monday the Muslim couple who carried out the massacre had been radicalised and had taken target practice at area gun ranges, in one case within days of the attack lasts week that killed 14 people.

White House spokesman Josh Earnest accused Mr Trump of playing on people's fears and trying to tap into "a darker side, a darker element" of American society.

From the Democratic presidential campaign, Bernie Sanders said: "Trump and others want us to hate all Muslims. The United States is a great nation when we stand together. We are a weak nation when we allow racism and xenophobia to divide us."

On Capitol Hill, Republican senator John McCain, of Arizona, said of Trump's idea: "It's just foolish."

But will it hurt his campaign? "I have no idea," Mr McCain said. "I thought long ago that things he said would hurt his prospects, and he continues to go up."

Meanwhile a mayor in Florida said he was banning Mr Trump from his city after the comments.

Playing off Mr Trump's earlier words, St Petersburg mayor Rick Kriseman tweeted that he was banning the businessman "until we fully understand the dangerous threat posed by all Trumps".

Sign up to our free newsletters

Get the best updates straight to your inbox:
Please select at least one mailing list.

You can unsubscribe at any time by clicking the link in the footer of our emails. We use Mailchimp as our marketing platform. By subscribing, you acknowledge that your information will be transferred to Mailchimp for processing.