President Trump’s travel ban policy is both legal and constitutional, the Supreme Court ruled Tuesday, delivering a massive victory to the White House and dashing hopes of Democrats and activists who hoped the justices would join the resistance.

Instead, the court, in a 5-4 ruling, said the president has broad powers to control who is admitted to the U.S. The ruling said those powers are strongest when the president is acting on national security grounds and, in this case, Mr. Trump gave sufficient justification for the need to restrict entry from some uncooperative countries.

The justices refused to hold Mr. Trump’s tweets and anti-Muslim campaign statements against him. They said the policy, which now applies to majority-Muslim and non-Muslim countries, is facially neutral — not the “Muslim ban” his critics had asserted.

“The text says nothing about religion,” wrote Chief Justice John G. Roberts Jr., who authored the main opinion in the case.

Trump critics were enraged. Some said the ruling was evidence that the justices were motivated by racism.

Liberal legal analysts said the ruling would go down in history among the worst ever issued by the high court.

Rep. Zoe Lofgren, California Democrat, called it “a stain on our nation’s history.”

For Mr. Trump, however, it was a long-awaited stamp of approval.

“The Supreme Court ruling was a tremendous victory for this country and the Constitution,” he told reporters at the White House.

In the near term, the decision means the government can continue to severely restrict entry of citizens of seven countries that Mr. Trump and his Cabinet deem to be uncooperative in sharing information about their citizens with the U.S.

More broadly, the ruling could shape the ongoing immigration debate.

The court ruled that Congress has clear powers to deny entry to broad categories of people, lawmakers gave the president wide latitude to carry out those powers and Mr. Trump was “squarely within the scope” of his authority with the travel ban.

“Under these circumstances, the government has set forth a sufficient national security justification to survive rational basis review. We express no view on the soundness of the policy,” Chief Justice Roberts wrote. “We simply hold today that plaintiffs have not demonstrated a likelihood of success on the merits of their constitutional claim.”

The court’s four Democrat-appointed justices dissented.

Two of them, Justices Stephen G. Breyer and Elena Kagan, said they would have asked lower courts to go back and see how the administration is carrying out the policy to prove whether it is constitutional or not.

Justice Sonia Sotomayor went further, in an opinion joined by Justice Ruth Bader Ginsburg. They compared the decision to some of the darkest rulings of the court’s past, such as the World War II-era decision upholding internment of Japanese-Americans for national security reasons.

Justice Sotomayor said Mr. Trump’s tweets and his campaign statements should be used against him because a clear line can be drawn from his campaign-era proposal for a “total and complete shutdown of Muslims entering the United States” to the travel ban policies.

“Taking all the relevant evidence together, a reasonable observer would conclude that the proclamation was driven primarily by anti-Muslim animus,” she wrote.

She warned of “pain and suffering” among American Muslims and said the court was effectively establishing them as “outsiders, not full members of the political community.”

Chief Justice Roberts countered that the latest version of the travel ban applies to just 8 percent of the world’s Muslim population. He pointed out that Mr. Trump’s original seven countries were all singled out by the Obama administration and Congress and that the updates were made after extensive work by his Cabinet, further undercutting anti-Muslim arguments.

Still, Mr. Trump’s rhetoric did appear to trouble some justices who upheld the travel policy.

Justice Anthony M. Kennedy, who signed onto the majority opinion, wrote a separate concurring opinion saying that while the courts can’t necessarily police all of the words of government officials, they should be careful not to go too far.

“An anxious world must know that our government remains committed always to the liberties the Constitution seeks to preserve and protect, so that freedom extends outward, and lasts,” he wrote.

The ruling marked a major validation for Mr. Trump and his aides, who consistently predicted that the lower court rulings would be overturned and his policy would be upheld.

Mr. Trump called the ruling a “profound vindication following months of hysterical commentary from the media and Democratic politicians.”

The ruling dashed hopes of Trump opponents in Congress and the press that they could rope the courts into playing referee to the president’s policy decisions.

Instead, the majority said its role is not to decide whether the presidential actions are wise, but rather whether they are legal. In this case, they said, the move clearly was legal.

“The courts won’t save us from Trump,” the Center for American Progress, a liberal think tank, said in its daily ThinkProgress memo.

The current policy is the third iteration of the travel ban.

Mr. Trump announced the first one by executive order a week after his inauguration, creating chaos at airports as people from seven countries subjected to the ban were turned back.

Immigrant rights advocates ran to the courts and received an immediate halt to the policy, launching 17 months of litigation.

Mr. Trump revised his policy in March 2017 by cutting Iraq out of the list of banned countries and issuing more narrow restrictions, as well as laying out a more thorough justification for why the policy was necessary.

Some courts upheld that policy as a valid exercise of presidential authority, but others ruled that it still violated constitutional rights of Americans and legal immigrants who deserved to have foreign relatives, business associates and others be able to visit them in the U.S.

The Supreme Court, weighing in last June, overturned some of the lower court blockades and allowed parts of that ban to go into effect.

Mr. Trump issued another revision last fall, updating the list so that it now covers North Korea and Venezuela, two non-majority Muslim countries, as well as Chad. Sudan was dropped from the list.

Yemen, Syria, Libya, Iran and Somalia remained on the list.

Chad would be dropped from the list in April.

The latest version of Mr. Trump’s policy includes a number of waiver provisions giving citizens of affected countries a chance to make a case for being allowed to enter the U.S.

Chief Justice Roberts pointed to that waiver process as more evidence that the policy wasn’t a Muslim ban, but rather a carefully crafted security plan.

Sign up for Daily Newsletters Manage Newsletters

Copyright © 2020 The Washington Times, LLC. Click here for reprint permission.