"The next justice could cast pivotal votes on whether it is legal to fire a transgender employee, target transgender students at school, or refuse health care to transgender patients".
Justice Sotomayor described at length various statements Mr Trump made on the campaign trail.
"We express no view on the soundness of the policy", Roberts added.
For Sharif, a 20-year-old Minneapolis native and the daughter of immigrant parents from Somalia, the court's decision was a painful one.
The 5-4 ruling rejected the argument that the ban represented unconstitutional religious discrimination.
A Supreme Court vacancy will likely become a key issue in a midterm congressional election year, when control of the Senate is at stake.
As Syrians face violence in their native country and a ban on entering the U.S., the executive director of the Syrian American Council told the Associated Press many people were scared. Finally, immigrants and refugees from Iran, Libya, Syria, Yemen, and Somalia haven't been allowed for months to enter the US without "a credible claim of a bona fide relationship" with a permanent resident in the United States. Three other majority-Muslim nations, including Chad, Iraq and Sudan have been removed. One reason is his decision to reduce the cap of the refugee intake from 110,000 to 45,000 a year.
A timeline of Trump's attempts at a travel banDecember 2015: Then campaigner Trump calls for banning all Muslims from entering the United States. "Hopefully, we will pick someone who is just as outstanding".More news: Argentina midfielder Javier Mascherano shoots down Jorge Sampaoli rift rumours
McConnell's inability past year to fulfill a longtime Republican promise of undoing Obama's signature health-care law strained his relationship with Trump and turned him into a momentary villain in his own party.
Venezuela and North Korea have also been targeted. "He's been a great justice for the Supreme Court".
Senators react to Supreme Court travel ban ruling. Justices Stephen Breyer, Ruth Bader Ginsburg and Elena Kagan also dissented.
Mrs Sotomajor said her conservative colleagues arrived at the opposite result by "ignoring the facts, misconstruing our legal precedent, and turning a blind eye to the pain and suffering the Proclamation inflicts upon countless families and individuals, many of whom are United States citizens".
Prominent on the list of possible successors are Judges Thomas Hardiman of Pennsylvania and William Pryor of Alabama, who were seriously considered for the seat eventually filled by Gorsuch, and Judge Brett Kavanaugh, who serves on the federal appeals court in Washington. "Unfortunately, every member of President Trump's "shortlist" has been vetted to ensure they will not uphold these basic rights".
Lawsuits over the Deferred Action for Childhood Arrivals program have cited Trump's statement referring to some Mexican immigrants as rapists as evidence the decision to end the program was motivated by prejudice against Mexicans.
Tuesday's court decision means the ban will remain in effect. "Wow!" a jubilant Trump tweeted after the ruling.
A Supreme Court with someone like Roberts in the ideological middle would not be unprecedented.