FILE PHOTO: A general view of the U.S. Supreme Court building in Washington, U.S., November 15, 2016. REUTERS/Carlos Barria

The U.S. Supreme Court, in a 5-4 ruling today, upheld President Donald Trump’s controversial ban on travel from several mostly Muslim countries, rejecting a challenge that it discriminated against Muslims or exceeded his authority. The ruling gives the White House its first high court victory on the merits of a presidential initiative.

Chief Justice John Roberts wrote the majority opinion, joined by his four conservative colleagues.

Back in February 2017, The first executive order on travel caused chaos at major airports when border officials refused to admit travelers who were in flight when the rules went into effect. It was quickly blocked by the courts. Enforcement of a second travel ban, issued about a month later, was also stopped by lower court judges.

The Supreme Court decision today ends 15 months of legal battles over a key part of Trump’s immigration policy. Opponents have attacked it as a Muslim ban that Trump had promised during his 2016 campaign.