(CBS) — The Supreme Court has upheld President Trump’s travel ban on Tuesday by a 5-4 vote, saying in its opinion that the order is “squarely within the scope of Presidential authority.”

The 5-4 decision Tuesday is the court’s first substantive ruling on a Trump administration policy.  The president reacted to news of the ruling, tweeting “wow.”

Chief Justice John Roberts wrote the majority opinion, joined by his four conservative colleagues. Roberts wrote that presidents have substantial power to regulate immigration. “The sole prerequisite,” Roberts wrote, is “that the entry of the covered aliens ‘would be detrimental to the interests of the United States.’ The President has undoubtedly fulfilled that requirement here.” Roberts pointed out that Mr. Trump had ordered an evaluation of every country’s compliance with the risk assessment baseline and then issued the findings.

“Based on that review, he found that restricting entry of aliens who could not be vetted with adequate information was in the national interest,” Roberts wrote.

Roberts also rejected the challengers’ claim of anti-Muslim bias.

But he was careful not to endorse either Trump’s provocative statements about immigration in general and Muslims in particular.

“We express no view on the soundness of the policy,” Roberts wrote.

However, CBS News’ Jan Crawford cautioned on CBSN that it “would be a mistake to read this ruling as, Trump can say whatever he wants.” The next case, the next issue — perhaps Russia — is a different case, and he could make remarks that could show insight into a different area of law.

The court may have signaled its eventual approval in December, when the justices allowed the policy to take full effect even as the court fight continued and lower courts had ruled it out of bounds.

Justice Sonia Sotomayor wrote in a dissent that based on the evidence in the case “a reasonable observer would conclude that the Proclamation was motivated by anti-Muslim animus.” She said her colleagues arrived at the opposite result by “ignoring the facts, misconstruing our legal precedent, and turning a blind eye to the pain and suffering the Proclamation inflicts upon countless families and individuals, many of whom are United States citizens.”

Justices Stephen Breyer, Ruth Bader Ginsburg and Elena Kagan also dissented.

In a tweet from the ACLU, the advocacy group said “this is not the first time the Court has been wrong, or has allowed official racism and xenophobia to continue rather than standing up to it.”

They added, “History has its eyes on us — and will judge today’s decision harshly.”

Ryan Mace of Amnesty International USA said in a statement following the ruling that the policy is “a catastrophe all around.”

“Some of the people banned from this policy are fleeing conflicts that the United States has had a direct hand in creating or perpetuating, as is the case in Yemen and Syria. In those cases especially we are essentially lighting a house on fire and locking the escape door shut. This ban, and the anti-Muslim sentiment in which it originated, has no place in a country that claims to value human rights,” Mace added.

Read the opinion here: