Open this photo in gallery Lisset Pino (L) and Celina Scott-Buechler protest outside of the U.S. Supreme Court after U.S. President Trump's travel ban was upheld by the U.S. Supreme Court in Washington on June 26, 2018. LEAH MILLIS/Reuters

The U.S. Supreme Court has upheld Donald Trump’s ban on people from five majority-Muslim countries from entering the United States, handing the President a key victory on his border crackdown strategy.

By a 5-4 majority, the court on Tuesday disregarded anti-Muslim statements from Mr. Trump, which opponents of the ban argued made the ban discriminatory against a specific religion and therefore unconstitutional. Rather, the court ruled, the President acted within the bounds of his legal authority to restrict immigration from countries he deemed a threat to U.S. national security.

The ruling did, however, appear to obliquely call on Mr. Trump to use the moral authority of the presidency to tamp down bigotry rather than inflame it.

Story continues below advertisement

Trump’s travel ban: A map of its long legal journey, and an explanation of how U.S. courts work



“We have to be tough and we have to be safe, and we have to be secure,” Mr. Trump said at a lunch with members of Congress in the White House cabinet room after tweeting: “SUPREME COURT UPHOLDS TRUMP TRAVEL BAN. Wow!”

SUPREME COURT UPHOLDS TRUMP TRAVEL BAN. Wow! — Donald J. Trump (@realDonaldTrump) June 26, 2018





The ruling gives the President a major boost as he charges ahead with a nationalistic agenda: Pursuing a zero-tolerance policy of criminally prosecuting migrants who enter the country illegally, demanding congressional funding for his promised wall on the border with Mexico and launching trade wars against allied and enemy countries alike.

And the decision could embolden Mr. Trump to use his executive powers on immigration more broadly as he tries to stop the flow of people from Central America.

During his presidential campaign, Mr. Trump called for “a total and complete shutdown of Muslims entering the United States,” accusing them of harbouring “hatred” that posed a “dangerous threat” to the country.

Starting in the first week of his presidency, Mr. Trump issued a series of travel bans for Muslim-majority countries, all of which were challenged in court. The current version of the ban, imposed last fall, put varying restrictions on citizens of Syria, Iran, Libya, Somalia, Yemen, Chad, North Korea and Venezuela. Mr. Trump said the ban was placed on countries that did not do enough to help the United States vet their citizens to ensure terrorists did not get into the country. Chad was dropped from the list after improving its vetting.

Story continues below advertisement

The Supreme Court allowed this version of the ban to remain in place while it deliberated.

Chief Justice John Roberts, writing for the majority, said Mr. Trump “lawfully exercised the broad discretion granted to him” by U.S. immigration law to exclude groups of people from entering the United States. He wrote that the court had to set aside the President’s comments on Muslims that were not part of the order, because “the issue before us is not whether to denounce the statements.”

“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,” the ruling says. “The text says nothing about religion.”

But Chief Justice Roberts appeared to include a plea to Mr. Trump to use his office to uphold the country’s tradition of religious acceptance. In a lengthy digression, the Chief Justice recalled times when the first U.S. president, George Washington, reassured the Jewish community that the new nation “gives to bigotry no sanction,” and George W. Bush reminded Americans in the days after the Sept. 11 attacks not to equate Islam with terrorism.

“The President of the United States possesses an extraordinary power to speak to his fellow citizens and on their behalf. Our Presidents have frequently used that power to espouse the principles of religious freedom and tolerance on which this Nation was founded,” Chief Justice Roberts wrote.

In a dissenting opinion, Justice Sonia Sotomayor said the travel ban was “motivated by anti-Muslim animus” that “masquerades behind a façade of national-security concerns.” She said the case bore parallels to the internment of Japanese Americans during the Second World War.

Story continues below advertisement

Mohammed Mashta, a Syrian immigrant who was a plaintiff in one of the court challenges to Mr. Trump’s bans, said the President made him feel like a “second-class citizen.” Tuesday’s court ruling means members of his family cannot come visit him in the United States.

“I spent my days in a fog, trying to somehow show to the world that I was not bad,” Mr. Mashta, who works as an engineer in an Ohio auto plant, said of the period after Mr. Trump’s first imposition of the ban. “If they are allowed to have this ban, what will they try next?”

Stephen Yale-Loehr, a Cornell University law professor who co-wrote a 21-volume treatise on U.S. immigration law, said the court’s decision could give Mr. Trump the legal basis to use his executive power to bar migrants trying to cross the Mexican border. The President could, for instance, declare El Salvador a national security threat because of the criminal gang MS-13 and block citizens of that country from entering the United States.

Mr. Yale-Loehr said Mr. Trump’s order has built an “invisible wall” around the United States, discouraging people from coming as students or tourists.

“There has been a decline in people coming, as the U.S. is seen as less welcoming. All this does continuing harm to the U.S. economy,” he said.

Anastasia Tonello, president of the American Immigration Lawyers Association, said the order would hurt the international reputation of the United States. “I don’t think this does anything to protect our country, and probably makes it less safe,” she said.

Story continues below advertisement

But the President, whose “America First” platform was always predicated on restricting both immigrants and imports, doubled down on his nativist rhetoric after the ruling.

“If you look at the European Union…they have been overrun,” he said, referring to the influx of migrants fleeing the Syrian civil war. “Frankly, a lot of those countries are not the same places any more.”