The Supreme Court voted to uphold President Donald Trump’s travel ban on Tuesday.

In a 5-4 vote with the court’s conservatives in its majority, it was decided that Trump acted lawfully in limiting travel from several Muslim–majority nations. Chief Justice John Roberts said in writing for the majority that Trump had statutory authority to make national security judgments in the realm of immigration, though he did acknowledge that the president has repeatedly mentioned his desires for a “Muslim ban.”

“The issue before us is not whether to denounce the statements,” Roberts wrote. “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.”

Roberts finished the opinion saying that the statement itself is neutral, writing “The proclamation is expressly premised on legitimate purposes: preventing entry of nationals who cannot be adequately vetted and inducing other nations to improve their practices.”

Trump immediately celebrated the decision on Twitter.

The president then went on to say that the ruling was a tremendous victory for the American people and that he felt vindicated in the decision.

This is the third iteration of the travel ban – issued in September – and it restricts entry from seven countries to various degrees: North Korea, Iran, Syria, Venezuela, Somalia, Libya and Yemen. Chad was recently removed from the list.

50 Celebrities Who Have Died In 2018 – Tribute Slideshow

Justices Anthony M. Kennedy, Clarence Thomas, Samuel A. Alito Jr. and Neil M. Gorsuch joined the majority opinion.

Justice Sonia Sotomayor accused the majority of upholding an “openly discriminatory policy motivated by animus” to a religious minority. While she noted that the majority did overrule the 1944 Korematsu v. United States that endorsed the detention of Japanese citizens during World War II, she said upholding the travel ban “merely replaces one gravely wrong decision with another.”

SLIDESHOW: DONALD TRUMP’S 30 CRAZIEST TWEETS

Sotomayor also quoted some of Trump’s anti-Muslim statements and mentioned that he had called for a “total and complete ban” on Muslims trying to enter the country. Justice Ruth Bader Ginsburg joined her dissent.

Protestors have reportedly gathered outside of the Supreme Court after the decision to uphold Trump’s travel ban.