In a landmark decision on presidential power, the Supreme Court upheld President Donald Trump’s travel ban — which forbids immigration from several Muslim-majority nations — on Tuesday.

The Court ruled 5-4 on the case, which was presented in April after two of Trump’s attempts at a ban were barred by courts across the nation.

In this version of the ban, restrictions are placed on travel from seven countries: Iran, Syria, Libya, North Korea, Venezuela, Yemen and Somalia. Six of the seven are predominantly Muslim. In an earlier version of the ban, travel from Chad would also be restricted.

Trump first attempted a travel ban just after he was sworn into office in January of 2017 in an attempt to uphold his campaign promise of securing the country’s borders. That was struck down almost immediately by various courts.

The second version of the ban progressed slightly farther, but the Supreme Court dismissed the Trump administration’s appeals due to the ban’s expiration.

The Supreme Court agreed to hear a case on the third ban in January, which prohibits people from the designated countries from emigrating to the United States. Certain countries also have restrictions on studying and vacationing in the United States.