The US Supreme Court on Monday partially reinstated President Donald Trump's controversial travel ban targeting citizens from six predominantly Muslim countries, before examining the case in full this autumn.
The Trump administration's ban -- put on hold by lower court rulings -- can be enforced for travellers from the targeted countries "who lack any bona fide relationship with a person or entity in the United States," until the court hears the case in October, the justices ruled.
The court tempered its ruling by saying the ban could not be implemented for now against people who have personal links to the United States, citing the examples of foreign nationals wishing to visit family or students accepted to attend a university.
But the Supreme Court's decision nonetheless marks a win for the Republican leader, who has insisted the ban is necessary for national security, despite criticism that it singles out Muslims in violation of the US constitution.
Trump had suffered a series of stinging judicial setbacks over the ban, with two federal appeals courts maintaining injunctions on it.
Those courts had argued the president had overstepped his authority, and that his executive order discriminated against travelers based on their nationality.
Omar Jadwat, director of the American Civil Liberties Union's Immigrants' Rights Project who argued one of the appellate cases brought against the ban, said he hoped the court's decision would mark a step towards ending an "indefensible and discriminatory ban."
"The Supreme Court now has a chance to permanently strike it down," Jadwat said in a statement.
Trump's revised measure, announced in March, seeks to bar from US entry travelers from Iran, Libya, Somalia, Sudan, Syria and Yemen for 90 days, as well as suspend the entry of refugees for 120 days.
The original measure, issued by executive order in January and almost immediately blocked by the courts, also included Iraq on the list of targeted countries and had imposed an indefinite ban on Syrian refugees.
In an ruling earlier this month, the three justices of the Ninth Circuit Court of Appeals said that "immigration, even for the president, is not a one-person show."
"National security is not a 'talismanic incantation' that, once invoked, can support any and all exercise of executive power," they added.
The Supreme Court narrowed the scope of the injunctions on the ban, saying the government could enforce its measure against "foreign nationals unconnected to the United States" without causing injury to the parties who filed suit.
Trump's travel ban's legal woes had left in limbo a key campaign promise by the Republican to crack down on immigration from Muslim countries.
The countries targeted were on a list from the previous Obama administration of places where the governments had very poor data on their own citizens, making it difficult to vet the identities of visa applicants.
The Trump administration says the ban is needed to prevent terror attacks in the country, and that it needs the time allowed by the ban to evaluate existing screening protocols and set new ones.
But courts ruled that because it applied selectively to mainly Muslim countries, the ban violated the US Constitution's ban on religious discrimination.
While the ban itself did not single out Muslims, the judges cited Trump's repeated statements during last year's presidential race that he intended to ban Muslims from entering the United States.
After the initial legal setback for the ban, the White House slightly revised the order. It deleted Iraq from the list and removed an indefinite ban on Syrian refugees.
But that too was shot down by courts in March. The Justice Department filed an emergency application to the Supreme Court on June 1, urging it to undo two lower court rulings. The White House argued that the US president has the power to set immigration policy, especially on national security grounds.
Even without the ban in place, arrivals from the six countries has dropped sharply, in part due to the "extreme vetting" approach of US authorities, toughening their scrutiny of visa applicants.
Arrivals from Iran, Libya, Somalia, Sudan, Syria and Yemen were down by nearly half in March and April from a year ago -- 6,372 for the two months compared to 12,100 in 2016, according to recent official data.