People visit the Supreme Court in Washington, Monday, June 26, 2017, as justices issued their final rulings for the term, in Washington. The high court is letting a limited version of the Trump administration ban on travel from six mostly Muslim countries take effect, a victory for President Donald Trump in the biggest legal controversy of his young presidency. (AP Photo/J. Scott Applewhite)

People visit the Supreme Court in Washington, Monday, June 26, 2017, as justices issued their final rulings for the term, in Washington. The high court is letting a limited version of the Trump administration ban on travel from six mostly Muslim countries take effect, a victory for President Donald Trump in the biggest legal controversy of his young presidency. (AP Photo/J. Scott Applewhite)

WASHINGTON (AP) — The Supreme Court is allowing President Donald Trump to forge ahead with a limited version of his ban on travel from six mostly Muslim countries to the U.S. Trump hailed the decision as a “victory for national security,” but it’s likely to set off a new round of court disputes over anti-terror efforts and religious discrimination.

The justices will hear full arguments in October in the case that has stirred heated emotions across the nation and pointed rebukes from lower courts saying the administration is targeting Muslims. Until then, the court said Monday, Trump’s ban on visitors from Iran, Libya, Somalia, Sudan, Syria and Yemen can be enforced if those visitors lack a “credible claim of a bona fide relationship with a person or entity in the United States.”

ADVERTISEMENT

The ruling sets up a potential clash between the government and opponents of the ban over the strength of visitors’ ties to the United States. A senior official said plans already had been written to enforce the ban aggressively. But immigrant groups said relatively few people try to enter the United States without well-established ties. Those groups said they will be sending lawyers and monitors back to American airports, where the initial, immediate implementation of the ban in January caused chaos and confusion.

State Department spokeswoman Heather Nauert said the ban would be implemented starting 72 hours after being cleared by courts. That means it will take effect Thursday morning.

The president has denied that the ban targets Muslims but says it is needed “to protect the nation from terrorist activities” committed by citizens of the six countries. All six have been designated as presenting heightened concerns about terrorism and travel to the United States.

The 90-day ban is necessary to allow an internal review of screening procedures for visa applicants from the countries, the administration says. That review should be complete before Oct. 2, the first day the justices could hear arguments in their new term.

The ban will have run its course by then, raising a question of whether the justices will even issue a decision in the case or dismiss it because it has been overtaken by events.

The court asked both sides to address the issue of timing, along with questions about whether the ban is aimed at Muslims, the impact of Trump’s provocative campaign statements and federal courts’ authority to restrain the president in the area of immigration.

ADVERTISEMENT

A 120-day ban on refugees also is being allowed to take effect on a similar, limited basis.

Three of the court’s conservative justices said they would have let the administration apply the bans without the limits imposed by their colleagues.

Justice Clarence Thomas, joined by Samuel Alito and Neil Gorsuch, said the government has shown it is likely to win the legal case in the end. Thomas said the government’s interest in preserving national security outweighs any hardship to people denied entry into the country.

Trump hailed the court’s order as a “clear victory for our national security,” especially after lower court rulings that blocked the travel ban in its entirety. He said in a statement that his “number one responsibility” is to keep Americans safe.

His administration’s implementation plans, largely orchestrated by White House adviser Stephen Miller, focus on refusing entry to people who are unable to show a substantial and pre-existing tie to a person or institution in the United States. The plans were described by a senior official who was familiar with them, speaking on condition of anonymity because this person was not authorized to discuss them publicly by name.

But some immigration lawyers said relatively few people would fall under the ban because people coming to study, work or visit family members already have sufficient relationships with others already is in the country.

“This order, properly construed, should really allow for only the narrowest implementation of any part of the ban. It’s going to be really important for us to make sure the government abides by the terms of the order and does not try to use it as a backdoor into implementing the full- scale Muslim ban,” said Omar Jadwat, the American Civil Liberties Union lawyer who is representing some of the challengers to the travel ban.

The court’s opinion explained the kinds of relationships people from the six countries must demonstrate to obtain a U.S. visa.

“For individuals, a close familial relationship is required,” the court said. For people who want to come to the United States to work or study, “the relationship must be formal, documented and formed in the ordinary course, not for the purpose of evading” the travel ban.

The opinion faulted the two federal appeals courts that had blocked the travel policy for going too far to limit Trump’s authority over immigration. The president announced the travel ban a week after he took office in January and revised it in March after setbacks in court.

The 4th U.S. Circuit Court of Appeals in Richmond, Virginia, said the ban was “rooted in religious animus” toward Muslims and pointed to Trump’s campaign promise to impose a ban on Muslims entering the country as well as tweets and remarks he has made since becoming president.

The San Francisco-based 9th U.S. Circuit Court of Appeals said the ban does not comply with federal immigration law, including a prohibition on nationality-based discrimination. That court also put a hold on separate aspects of the policy that would keep all refugees out of the United States for 120 days and cut by more than half, from 110,000 to 50,000, the cap on refugees in the current government spending year that ends Sept. 30.

Trump’s first executive order on travel applied to travelers from Iraq and well as the six countries, and took effect immediately, causing chaos and panic at airports as the Homeland Security Department scrambled to figure out whom the order covered and how it was to be implemented.

A federal judge blocked it eight days later, and that was upheld by a 9th circuit panel. Rather than pursue an appeal, the administration said it would revise the policy.

In March, Trump issued the narrower order.

___

Associated Press writers Ted Bridis and Josh Lederman contributed to this report.