“Today’s unanimous Supreme Court decision is a clear victory for our national security. It allows the travel suspension for the six terror-prone countries and the refugee suspension to become largely effective,” Trump said in a statement. “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.”

“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.”

Several federal courts have halted enforcement of the ban because they determined it unlawfully discriminates against Muslims.

In the interim, the court will allow a watered-down version of the ban to go into effect. People with “a bona fide relationship with a person or entity in the United States” will not be subject to the ban. That group includes people coming to visit their family or students coming to study.

Trump’s celebratory statement incorrectly stated that the justices’ decision Monday “was 9-0.” The decision was “per curiam,” meaning that it was unsigned by any particular justices.

Justice Clarence Thomas, joined by fellow conservatives Samuel Alito and Neil Gorsuch, wrote a separate opinion, agreeing with the overall decision but arguing that the ban should be reinstated “in full.”