WASHINGTON — The No. 2 House Democrat said the Supreme Court’s decision to allow parts of the Trump administration’s travel ban to go forward while agreeing to hear the case in October “hands a victory to ISIS.”

The court said people from the six Muslim-majority nations named in the travel restrictions blocked by lower courts would have to have a “bona fide relationship with any person or entity in the United States” to enter the country. That could include relatives, employers or educational institutions.

Refugees may still apply, making a case for hardship that prevents them from returning to their home countries, but “the balance tips in favor of the government’s compelling need to provide for the Nation’s security” if they, too, don’t already have connections in the United States.

White House press secretary Sean Spicer called the ruling “a positive step forward” and said the Justice Department “in particular is reviewing this in terms of both its implementation and its impact.”

“So I don’t want to get too far ahead of all of these brilliant legal minds as they review the impact,” he said.

House Minority Whip Steny Hoyer (D-Md.) argued that one impact would be terrorist empowerment.

“This ban places our country in serious danger and undermines the very foundations of our democracy,” Hoyer said in a statement. “It hands a victory to ISIS and other terror groups by providing them with a potent tool for recruitment and radicalization.”

“I am confident that the court, after hearing the full case against it, including the president’s own statements about whom the ban targets, will rule this ban unconstitutional and prevent it from eroding Americans’ safety,” he added. Lower courts cited in their decisions to halt the executive order Trump referring to the travel restrictions as a Muslim ban.

Rep. Andy Biggs (R-Ariz.) countered that “regardless of what you might think of the policy itself, the president has the authority to make these decisions.”

“This order was a victory for the U.S. Constitution and for President Trump’s commitment to his promise to keep our nation secure,” Biggs added. “The United States of America will always be a nation of and compassionate to immigrants, but we must ensure the safety of American citizens above all else.”

Senate Foreign Relations Committee Ranking Member Ben Cardin (D-Md.) said he hoped “the Supreme Court will ultimately act with clarity that we will not allow religious tests as to who can come to America.”

“That is the question that must be answered, because the selection of Muslim majority countries by the administration was purposeful and continues to serve as a recruitment tool for extremist groups,” Cardin said, adding “there will be people hurt because of the refugee ban.”

“The refugees seeking to come to America from these countries have not caused problems for American national security. They go through the most stringent screening in the world, including the UN refugee agency and the Department of Homeland Security and other U.S. government agencies, undergoing extensive background, medical and security screenings. They in fact are often the victims of terrorists in their own countries,” the senator said. ““The president claiming he is keeping America secure through his travel ban is in fact a phony argument about American security.”