(Adds details on ruling, background on case)
WASHINGTON, June 26 (Reuters) - The U.S. Supreme Court on Monday handed a victory to President Donald Trump by allowing his temporary bans on travelers from six Muslim-majority countries and all refugees to go into effect for people with no connection to the United States while agreeing to hear his appeals in the closely watched legal fight.
The court, which narrowed the scope of lower court rulings that had completely blocked his March 6 executive order, said it would hear arguments on the legality of one of Trump's signature policies in his first months as president in the court's next term, which starts in October.
The justices granted parts of his administration's emergency request to put the order into effect immediately while the legal battle continues.
The court said that the travel ban will go into effect "with respect to foreign nationals who lack any bona fide relationship with a person or entity in the United States."
The Supreme Court left the lower-court injunctions against the ban in place, but only with respect to the challengers to the ban themselves and others in similar circumstances, meaning they involve people in the United States who have relationships with foreign nationals abroad and whose rights might be affected if those foreigners were excluded from entry.
But the court said the injunctions were too broad to also include barring enforcement of the ban against foreigners who have no connection to the United States at all. "Denying entry to such a foreign national does not burden any American party by reason of that party's relationship with the foreign national," the court said.
The court also said it would allow a 120-day ban on all refugees entering the United States to go into effect on the same grounds, allowing the government to exclude from the United States refugee claimants who do not have any "bona fide relationship" with an American individual or entity.
Three of the court's conservatives said they would have granted Trump's request in full, including Trump appointee Neil Gorsuch.
The case is Trump's first major challenge at the Supreme Court, where he restored a 5-4 conservative majority with the appointment of Gorsuch, who joined the bench in April. There are five Republican appointees on the court and four Democratic appointees.
The March 6 order called for a 90-day ban on travelers from Libya, Iran, Somalia, Sudan, Syria and Yemen and a 120-day ban on all refugees entering the United States to enable the government to implement stronger vetting procedures. It was blocked by federal judges before going into effect on March 16 as planned.
Trump issued the order amid rising international concern about attacks carried out by Islamist militants like those in Paris, London, Brussels, Berlin and other cities. But critics have called the order a mean-spirited, intolerant and un-American "Muslim ban."
The state of Hawaii and a group of plaintiffs in Maryland represented by the American Civil Liberties Union argued that the order violated federal immigration law and the Constitution's First Amendment prohibition on the government favoring or disfavoring any particular religion. Regional federal appeals courts in Virginia and California both upheld district judge injunctions blocking the order.
Trump signed the order as a replacement for a Jan. 27 order issued a week after he became president that also was blocked by federal courts. The revised order was intended 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 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.
Trump has called the March order a "watered down, politically correct" version of the January one. But the order still embodied his "America First" nationalist message and reflected his views of the dangers posed to the United States by certain immigrants and visitors.
The administration has said the travel ban is needed to allow time to implement stronger vetting measures, although it has already rolled out some new requirements not blocked by courts, including additional questions for visa applicants.
(Reporting by Lawrence Hurley. Additional reporting by Andrew Chung; Editing by Will Dunham)