The Supreme Court of the United States says it will allow a partial enforcement of President Donald Trump's ban on travellers from six Muslim-majority countries and all refugees until it reviews it in October.
The action on Monday was hailed as a win by the right-wing leader, who has insisted the ban is necessary for national security, despite severe criticism that it singles out Muslims in violation of the US constitution.
The justices at the highest US court narrowed the scope of lower court rulings that had completely blocked Trump's March 6 executive order. They also agreed to hear the government's appeals in the cases.
Trump's executive order suspends new visas being issued to people from Iran, Libya, Somalia, Sudan, Syria and Yemen for at least 90 days. It also partly allows a 120-day ban on all refugees entering the United States to go into effect.
Both bans are now due to partly go into effect in 72 hours, based on a memorandum issued by the Trump administration on June 14.
In agreeing to hear the case later this year, the Supreme Court is allowing parts of the order to go ahead.
Specifically, the court said the executive order would be enforced on foreign nationals who did not have a "credible claim of a bona fide relationship" with a US person or organisation.
In effect, that means that individuals from the designated countries who have never been to the US before or lacked a relationship with an American or American organisation could still have their visa denied during the three-month period.
But what a "bona fide relationship" exactly constitutes is a matter of dispute.
In a dissenting opinion, Justice Clarence Thomas warned that requiring officials to differentiate between foreigners who have a connection to the US and those who do not will prove "unworkable".
"Today's compromise will burden executive officials with the task of deciding - on peril of contempt - whether individuals from the six affected nations who wish to enter the United States have a sufficient connection to a person or entity in this country".
He added that the decision would result in a "flood of litigation" until the court issued its ruling.
Shortly after the court issued its opinion, the American Civil Liberties Union (ACLU) said on Twitter it would "head back into court to fight the fundamentally unconstitutional Muslim ban this October".
Omar Jadwat, the director of the ACLU's Immigrants' Rights Project who had argued the case in court, said in a statement that the travel ban "violates the fundamental constitutional principle that government cannot favor or disfavor any one religion".
"Courts have repeatedly blocked this indefensible and discriminatory ban. The Supreme Court now has a chance to permanently strike it down," he said.
Lara Finkbeiner, from the International Refugee Assistance Project, which also sued the administration over the ban, said she was "incredibly disappointed with the decision".
"We are a nation that values acceptance and diversity, and in making this decision and putting this executive order back into effect, the Supreme Court is sending a very clear message and it's putting the executive's discriminatory policy back into effect."
But Trump praised the decision, saying in a statement it allowed his travel ban "to become largely effective".
"Today's unanimous Supreme Court decision is a clear victory for our national security," Trump said, adding that the ruling allowed him "to use an important tool for protecting our nation's homeland".
Al Jazeera's Kimberly Halkett, reporting from Washington, DC, said that Trump was portraying the decision as a clear victory - even though this was a view that was not shared by everyone.
"The president in his statement is celebrating a victory. The court really upheld the cracks of the government's case, although saying it will be looking at this case in October," she said.
"The court upheld a 1952 law that gives the president broad powers about immigration when there are concerns about national security."
Source: Al Jazeera and news agencies