The Supreme Court is letting a limited version of the Trump administration ban on travel from six mostly Muslim countries to take effect, a victory for President Donald Trump in the biggest legal controversy of his young presidency.
The justices will hear arguments in the case in October.
The court also granted an emergency request from Trump's administration to allow another 120-day ban on refugees to come into effect.
Visitors from Iran, Libya, Somalia, Sudan, Syria and Yemen will now be subject to parts of the 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 court is allowing the ban to go into effect for foreign nationals who lack any "bona fide relationship with any person or entity in the United States".
It means that students and those with family in the U.S. can still travel to the country - although it did not specify what family ties and what "entities" were acceptable.
"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 said.
The original ban, put in place shortly after Trump's inauguration, barred everyone from seven countries from entering the US even if they had green cards, valid visas or refugee status.
Conversely, those with a "close familial relationship" in the U.S. are not affected.
The Supreme Court is rejecting yet another call to decide whether Americans have a constitutional right to carry guns with them outside their homes.
In March, Trump issued the narrower order. The revised order was meant to overcome the legal issues posed by the original ban, which also included Iraq among the nations targeted and a full ban on refugees from Syria.
The decision is 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 USA constitution. The revised order also jettisoned language that gave preferential status to persecuted religious minorities, which critics said could be taken as favoring Christians and other religious groups over Muslims.