The Supreme Court agreed on Monday to hear arguments on the legality of one of President Donald Trump's signature policies from the first months of his presidency. The appeal case was scheduled to be heard at the start of the court's next term, in October.

The justices also agreed to grant parts of his administration's emergency request to put the March 6 executive order into effect while the legal battle continues. Last week Trump said the ban would take effect 72 hours after being cleared by the court.

With one exception, the Supreme Court also said it would allow a 90-day ban on all refugees entering the US to go into effect. The court ruled that people "with a credible claim of a bona fide relationship with a person or entity in the United States" could not be denied entry into the country.

Trump welcomes ruling

Trump released a statement welcoming the Supreme Court decision saying it was a clear victory for national security.

"As president, I cannot allow people into our country who want to do us harm. I want people who can love the United States and all of its citizens, and who will be hardworking and productive," Trump wrote in a statement.

"My number one responsibility as commander in chief is to keep the American people safe. Today's ruling allows me to use an important tool for protecting our Nation's homeland. I am also particularly gratified that the Supreme Court’s decision was 9-0."

On Twitter, he later added: "Great day for America's future security and safety, courtesy of the US Supreme Court. I will keep fighting for the American people, & WIN!"

Read more: US President Trump slams his own Justice Department on 'travel ban' appeal

Real crunch in October

Read more: US appeals court keeps block on Trump's travel ban

Opponents of the ban welcomed the limitations put on the temporarily reinstated ban, as well as the prospect of the case being heard in the fall.

David Cole, national legal director of the American Civil Liberties Union, said the ruling's impact would be limited and the real crunch would come in October.

The judges "essentially adopted a middle course" between the government's request to uphold Trump's order and the ACLU's appeals to stay the ban, he told news agency AFP.

"The court went out of its way to not tip its hand as to how it will rule on the ultimate issue, which is whether the president has the power to do this."

The New York Immigration Coalition, another fierce opponent, said the ruling created more confusion by using the term 'bona fide relationship,' which "agencies and individuals will struggle to make sense of."

Internal security review to finish by October

Trump's travel ban aimied to block all visitors from six predominantly Muslim countries - Iran, Libya, Somalia, Sudan, Syria and Yemen.

Trump's justification for the ban was to carry out an internal review of the screening procedures for visa applicants from those countries. That review is expected to be completed before the court begins its fall term on October 2.

The court's three most conservative members - Clarence Thomas, Samuel Alita and Neil Gorsuch - said they would have allowed the ban to take effect without restrictions. They said the government had shown it was likely to succeed on the merits of the case.

Thomas said the government's interest in maintaining national security outweighed any hardship to people denied entry into the country.

Federal courts blocked ban

Two federal appeals courts blocked the travel ban, which Trump first announced shortly after taking office in January. A revised ban was also shot down by a court in March. In both cases, the courts found the ban discriminatory because they openly targeted Muslims.

The 4th US Circuit Court of Appeals in Richmond, Virginia found the ban "rooted in religious animus" towards Muslims. As evidence, it noted Trump's campaign promise to impose a ban on Muslims entering the country, in addition to tweets and comments he made since becoming president.

The 9th US Circuit Court of Appeals in San Francisco found that Trump's proposed travel ban violated federal immigration law, including a prohibition against discrimination based on nationality.

Jadwat, director of the American Civil Liberties Union's Immigrants' Rights Project who argued one of the appellate cases brought against the ban, said he hoped the court's decision would mark a step towards ending an "indefensible and discriminatory ban."

"The Supreme Court now has a chance to permanently strike it down," Jadwat said in a statement.

aw,bik/rc (AP, Reuters, AFP, dpa)