President Donald Trump scored a huge victory on Thursday when the Supreme Court voted to uphold his travel ban affecting several mostly Muslim countries.

Fox News reported that the 5-4 ruling upholds the selective travel restrictions that outraged liberals claimed were unconstitutional. The Supreme Court agreed with Trump that these rules are necessary for security reasons.

The majority opinion was written by Chief Justice John Roberts, who said that the order was “squarely within the scope of presidential authority” under federal law.

“The sole prerequisite set forth in [federal law] is that the president find 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,” he wrote.

Justice Sonia Sotomayor was one of the four justices who dissented, and along with Justice Stephen Breyer, she made the unusual move of reading her dissension from the bench.

“This repackaging does little to cleanse [the policy] of the appearance of discrimination that the president’s words have created,” she said. “Based on the evidence in the record, a reasonable observer would conclude that the proclamation was motivated by anti-Muslim animus.”

Trump has always denied that this was a “Muslim ban,” but liberal judges have cited statements he made when he was a candidate in declaring the rules to be unconstitutional. However, Roberts effectively said in his decision that Trump’s prior comments were not relevant to the constitutionality of his travel ban.

“The issue before us is not whether to denounce the statements,” wrote Roberts. “It is instead the significance of those statements in reviewing a Presidential directive, neutral on its face, addressing a matter within the core of executive responsibility. In doing so, we must consider not only the statements of a particular President, but also the authority of the Presidency itself.”

President Trump himself took to Twitter to celebrate the ruling.

“SUPREME COURT UPHOLDS TRUMP TRAVEL BAN. Wow!” Trump wrote.

SHARE this story if you support the Supreme Court’s ruling!