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." The court, in an unsigned opinion, left the travel ban against citizens of six majority-Muslim on hold as applied to non-citizens with relationships with persons or entities in the United States, which includes most of the plaintiffs in both cases.
Examples of formal relationships include students accepted to US universities and an employee who has accepted a job with a company in the US, the court said.
This is the first time the high court has weighed in on the travel ban, and a partial victory for the Trump administration, which has been fighting lower court rulings blocking the ban from taking effect. Justices did not address Trump's tweets which have caused legal problems for his administration previously.
The ban, which bars people from Iran, Libya, Somalia, Sudan, Syria and Yemen from entering the US for 90 days -- outside of the "bona fide" relationship exception -- could take effect in as little as 72 hours.
Trump called the decision "a clear victory for our national security."
"As President, I cannot allow people into our country who want to do us harm," he added in a statement. "I want people who can love the United States and all of its citizens, and who will be hardworking and productive."