MOUNT PLEASANT, S.C. - Donald Trump called Monday for a "total and complete shutdown of Muslims entering the United States," an idea swiftly condemned by his rival GOP candidates and other Republicans.

The proposed ban would apply to immigrants and visitors alike, a sweeping prohibition affecting all adherents of Islam who want to come to the U.S. The idea faced an immediate challenge to its legality and feasibility from experts who could point to no formal exclusion of immigrants based on religion in America's history.

Trump's campaign said in a statement such a ban should stand "until our country's representatives can figure out what is going on." It said the proposal comes in response to a level of hatred among "large segments of the Muslim population" toward 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," Trump said in the statement.

At an evening rally in South Carolina, Trump supporters cheered and shouted in support as he read his statement. Trump warned that without drastic action, the threat of attacks is "going to get worse and worse."

Since the Paris 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 U.S.

But Trump's proposed ban goes much further, 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 said via Twitter. "His 'policy' proposals are not serious."

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

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

Ben Carson said he would not advocate "being selective on one's religion" but does believe that "everyone visiting our country should register and be monitored during their stay."

On Capitol Hill, Republican Sen. John McCain of Arizona said, "It's just foolish."