The United States Supreme Court has handed over a partial victory Monday to President Donald Trump reviving parts of a ban on traveling to people from six predominantly Muslim countries which he said is necessary for national security but opponents describe as discriminatory.

Judges have narrowed the scope of lower court decisions that had completely blocked the key elements of an executive order on March 6 that Trump had said was necessary to prevent terrorist attacks, allowing a temporary ban to go into effect for People who have no close relationship with the United States.

The court issued its decision on the last day of its current term and agreed to hear oral arguments during its next term in October, so it can finally decide whether the ban is lawful in a major review of presidential powers.

In a statement, Trump described the Supreme Court’s action “a clear victory for our national security,” saying that judges allowed the suspension of travel become largely effective.

“As a president, we can not allow people in our country who want to hurt us. I want people who like the United States and all citizens, and who will be complicated and productive,” Trump said.

Trump’s order on March 6 called for a 90-day ban on Iranians, Libya, Somalia, Sudan, Syria and Yemen, and a 120-day ban on all refugees while the government set up stronger monitoring procedures. The court allowed a limited version of the refugee ban, which was also blocked by the courts, to come into force.

Trump issued the order as part of a growing international concern about attacks by Islamist militants such as Paris, London, Brussels, Berlin and other cities. But he said that aspiring individual affected countries had been led to attacks in the United States.

Federal courts have said the travel ban violated federal immigration law and discriminates against Muslims in violation of the US Constitution. Critics have called a discriminatory “Muslim ban.”

Ahmed al-Nasi, an official with the Ministry of Expatriates Affairs Yemen, expressed disappointment.

“We believe that this will not prevent us from dealing with terrorism and extremism, but as citizens of these countries will have more the impression that all are targeted, especially since Yemen is a partner States active in the war against terrorism and not Are joint operations against terrorist elements in Yemen, “he said.

Groups that defied the ban, including the American Civil Liberties Union, said that the majority of people in affected countries who wish to enter the United States would have the necessary connections. But they expressed concern that the administration interprets the ban as widely as possible.

“It will be very important for us during this period of intervention to ensure that the government respects the terms of the order and does not try to use it as a back door to implement the large-scale Muslim ban was sought to implement,” said Omar Jadwat, lawyer Of the ACLU.

During the 2016 presidential race, Trump has campaigned for “full and complete” Muslims entering the United States. The travel ban was a signature policy of Trump’s early months as president.