Donald Trump has faced a torrent of criticism after releasing a policy proposal that would ban all Muslims from entering the United States.

His fellow Republicans haven't held back: Marco Rubio called it "offensive," and Jeb Bush called it "unhinged." A number of others — politicians, pundits, experts and regular folks — have called it unconstitutional.

Scholars, however, are hotly debating that last point because many say the Constitution gives Congress a lot of leverage to decide who is allowed to enter the country. Some constitutional experts we talked to say Trump's proposal was clearly out of line with the founding document; others say at least some parts are on murky legal ground.

"Almost all of what [Trump] is saying is stupid," Akhil Reed Amar, a constitutional expert at Yale Law School, tells us. "Much of it is un-American. But some of it is constitutional."

Trump so far has released very few details on his policy. His aides have told Fox News that it would include all Muslims, but Trump has said in an interview with the network that U.S. military personnel who are Muslim and serving abroad would be allowed back in.

Amar says that under current case law, Congress — and it's important to note here that a President Trump would have to persuade Congress to take up his cause — could pass a law barring foreign Muslims from entering the country and it would be constitutional. But Amar says any law that also barred Muslims who are American citizens from re-entering the country would violate the Constitution.

"The Supreme Court has never completely repudiated a very long-standing doctrine — known as the 'plenary power' doctrine — that gives Congress very broad power to keep aliens of all sorts from entering America if Congress so chooses," Amar says.

In fact, the United States has in the past excluded immigrants based on their national origin. For example, under the Chinese Exclusion Act, the U.S. barred Chinese nationals from entering the United States from the late 1800s until 1943, when the act was repealed.

Michael C. Dorf, a constitutional expert at Cornell University Law School, says one could make an argument that barring non-American Muslims from the country is constitutional but that such a law would "also be grotesquely immoral."

Ultimately, Dorf says, a law like that would be ruled unconstitutional by a narrow margin.

"The U.S. routinely applies different immigration rules for nationals of different countries," Dorf says. "Nonetheless, immigration law is not a constitutional no man's land. Odious discrimination in immigration law is unconstitutional, as the House of Representatives itself tacitly recognized when just three years ago it passed a resolution expressing regret for the Chinese exclusion laws, which were based on ethnic prejudice. Immigration policy based on religious prejudice would be equally odious, and thus unconstitutional."

Gabriela Rivera, a staff attorney for the American Civil Liberties Union of San Diego and Imperial Counties, says that throughout the years, the high court mostly upheld the exclusion act, which Congress revised many times.

"For example, in the 1905 case United States v. Ju Toy, the court held that a U.S. citizen of Chinese descent — who shouldn't have even been subject to the act — who was denied entry to the United States was not deprived of due process when port administers denied him entry," Rivera says. The court also declined to put any limits on Congress' ability to create a law of that kind. However, Rivera doubts a law like that would pass constitutional muster today.

Laurence H. Tribe, a professor of constitutional law at Harvard University, says he's certain that Trump's proposal would violate the Constitution.

Yes, he says, some court decisions have found that the some parts of the protective mantle of the Constitution don't extend to foreigners. But according to Tribe's interpretation, some of the most well-known protections — such as the First Amendment's guarantee of religious freedom and the Fifth Amendment's guarantee of due process — are not limited by nationality or geography.

"The [Fifth Amendment] applies to U.S. conduct with regard to any 'person,' wherever located and of whatever citizenship," Tribe writes in an email. "And [the First Amendment] is a flat prohibition on actions that the U.S. government may take, including those actions that respect 'an establishment of religion' or prohibit 'the free exercise thereof.' "

What's more, Tribe says, a religious litmus test like the one proposed by Trump would violate the spirit of Article VI of the Constitution, which prohibits the government from requiring a religious test to qualify for public office.

Daniel Halberstam, a constitutional law professor at the University of Michigan, brings up another issue. He says foreign nationals would have a hard time successfully suing the United States over a policy like this, because they have to have "a constitutionally recognized interest in coming here" before a court even decides to hear the case.

But the right one, Halberstam says, could make it to the courts. For example, if a Muslim abroad applied for a visa to come to the United States to speak at a university and was denied, the courts would take up the case. Halberstam says the law would be found "unconstitutional in a heartbeat."

Amar, the Yale professor, says that despite the fact that he argues parts of the policy are constitutional, he doesn't like it.

He says the proposal is antithetical to the successful pluralistic democracy that the U.S. has built. He notes that not a single justice on the Supreme Court right now is a Protestant and no one has made a big deal about that. He points out that during the last presidential contest, three of the four major party candidates were not members of mainstream Protestant churches.

Copyright 2016 NPR. To see more, visit