Jul 2, 2018.

The Supreme Court ruled Tuesday in favor of President Donald Trump’s September order to restrict travel from several majority Muslim countries to the United States.

In the 5-4 opinion written by Chief Justice John Roberts, the court found that President Trump’s travel restriction fell “squarely” within the president’s authority. The court rejected claims that the ban was motivated by religious hostility.

“The [order] is expressly premised on legitimate purposes: preventing entry of nationals who cannot be adequately vetted and inducing other nations to improve their practices,” Roberts wrote. “The text says nothing about religion.”

President Trump, who issued the ban in September, hailed the ruling in the case. The travel restriction, the administration’s third, affects people from Iran, Libya, North Korea, Somalia, Syria, Venezuela, and Yemen.