There's no legal or historical precedent for closing US borders to the world's 1.6 billion Muslims, but neither is there any Supreme Court case that clearly prevents a president or Congress from doing so. Legal experts are divided over how the high court would react to Republican presidential candidate Donald Trump's call for a temporary halt to Muslims entering the United States. "The court has never been faced with a challenge against a whole religion. I think that would raise interesting and novel questions for the court," said Stephen Yale-Loehr, who teaches immigration law at Cornell University's law school. Any such blanket action based on a person's religion would be unconstitutional if applied to US citizens, scholars agree. But courts have given Congress and the president wide discretion when it comes to immigration. "I don't actually think it would be unconstitutional. The president has a huge amount of discretion under the immigration statute," said Eric Posner, a constitutional law professor at the University of Chicago. The same protections given citizens do not apply to people who are neither American nor in the United States, Posner said. Courts have upheld the denial of visas to enter the country to Marxists and people born to parents who were not married, among many categories. The Supreme Court has never struck down an immigration classification on the basis of race or any other reason, said Temple University immigration expert Peter Spiro. Other scholars offer a different take. They say the court would not grant the president a blank check and would instead rely on constitutional provisions that protect religious freedom and prohibit discrimination to strike down a ban on Muslim visitors to the United States. "Imagine that instead of banning Muslims, we banned blacks from any country," said Vanderbilt University's Suzanna Sherry, describing a hypothetical reaction to a period of intense racial unrest in the United States. "If you're black, you can't come into the country. ... I don't think a court today would ever hold that constitutional," Sherry said. Sherry acknowledged that she cannot cite any case involving immigration to support her view, and that a Supreme Court decision to uphold bans on Chinese laborers in the late 1800s points in Trump's favor. "But developments in discrimination law and First Amendment law suggest that the court would not today uphold an exclusion on the basis of religion," she said. The Supreme Court also upheld the internment of Japanese-Americans during World War II. Both the anti-Chinese laws and the internment camps now are widely seen as shameful episodes in American history. But no less an authority than Supreme Court Justice Antonin Scalia has said it is naive to think the country would never again resort to such harsh measures, particularly during wartime. "That's what was going on — the panic about the war and the invasion of the Pacific and whatnot. That's what happens," Scalia said on a visit to Hawaii in 2014, describing the mood in America following Pearl Harbor that led to the internment camps. "It was wrong, but I would not be surprised to see it happen again, in time of war. It's no justification, but it is the reality." Predictions about how the court might rule do not matter as much as public reaction at the moment. While 58 percent of Americans oppose a temporary ban on Muslim visitors in a CBS News poll, Trump's proposal finds much more favorable reaction from Republicans. Fifty-four percent Republicans support the ban, the poll found. Trump has remained at the head of the Republican field for months, and his tough words about Muslims may be tapping into fears among Republican voters about immigrants from the Middle East. His proposal to keep Muslims from entering the United States followed the Dec. 2 shootings in San Bernardino, California, that left 14 dead and 21 wounded. Tashfeen Malik, a Muslim from Pakistan who with her husband was killed by police in a gun battle after the rampage, entered the country on a fiancee visa that is issued abroad to people who plan to marry American citizens, authorities have said. Last year, Malik married the other suspect in the shooting, US citizen Syed Rizwan Farook. Trump said he would prevent Muslims from entering the United States "until our country's representatives can figure out what the hell is going on." Trump's proposal turns traditional ideas about the United States as a beacon for political and religious refugees upside down, said Mary Meg McCarthy, executive director of the National Immigrant Justice Center in Chicago. "In all honesty, I never in my whole entire life thought that we'd be fighting for the human and due process rights of refugees," including many who have fled religious persecution, McCarthy said. Efforts to halt the flow of refugees risks disturbing the balance "our commitment to fairness and refugee protection with our national security interests," she said. — AP