WASHINGTON — The Trump administration announced a new ban Sunday on most travel to the U.S. by nationals of seven countries — North Korea and six in the Mideast and North Africa.

The order replaces the much-disputed travel ban President Donald Trump issued in March, parts of which were blocked in court. That order, a revision of one Trump issued during his first days in office, expired Sunday. The latest version, which will be indefinite, takes full effect Oct. 18.

The Supreme Court is scheduled to hear arguments Oct. 10 on whether the earlier ban violated the Constitution. It was not immediately clear how the new order would affect that case. Some parts now might be moot, but other disputes might remain live. The new proclamation Trump signed, for example, does not resolve the status of refugees covered by the earlier ban.

Under the new order, no existing visas will be revoked, and people allowed to travel to the U.S. for other reasons will not be affected, the administration said.

The order covers most of the same countries subject to the original travel ban, with Chad and North Korea joining Iran, Syria, Yemen, Somalia and Libya on the list and Sudan moving off it.

Administration officials said countries had been selected for restrictions based on their ability and willingness to screen and vet travelers and verify their identities. All of the countries except North Korea, are majority Muslim, a fact that has figured prominently in court challenges to the ban.

During a worldwide review of security procedures, 16 countries were found to not comply with U.S requirements, administration officials told reporters. Those included a country's willingness to share information about a prospective traveler's history of criminal or terrorism-related acts, and whether the country in question was equipped to issue electronic passports with embedded biometric information.

Most of the 16 countries worked with administration officials to meet U.S. requirements, but the seven remaining ones could not or would not cooperate, officials said.

Judges who ruled against the earlier ban in several cases said they were doing so in part because they viewed the restrictions as an effort to enact the "total and complete shutdown" of Muslim travel to the U.S. that Trump had called for as a candidate.

The White House has always denied that, although Trump made several statements on Twitter and at rallies in the last few months that complicated the administration's legal case.

Some Trump supporters pointed to the addition of North Korea to the list as evidence that the travel restrictions were not directed at Muslims. In practice, almost no North Koreans are currently allowed to travel to the U.S., so the order will continue to have its greatest effect on nationals of majority-Muslim countries.

Immigrant advocacy groups made clear that they would use many of the same arguments against the new restrictions that they wielded in courtrooms, legislatures and demonstrations against the previous versions.

"This is the Muslim ban by another approach," Frank Sharry, head of America's Voice, an immigration advocacy group, said Sunday. "He's doing this to circumvent the courts and ban people based on the God they pray to, and that's unconstitutional."

The American Civil Liberties Union, which led many of the court challenges to the earlier bans, also criticized the new rules.

"President Trump's original sin of targeting Muslims cannot be cured by throwing other countries onto his enemies list," said Anthony D. Romero, the group's executive director.

The White House, as with previous incarnations of the travel ban, portrayed it as a necessary safety measure.

"As president, I must act to protect the security and interests of the United States and its people," the proclamation declared.

Asked earlier in the day about plans for a new ban, Trump told reporters "the tougher the better."

Administration officials offered a more nuanced explanation, saying that the new ban was more narrowly targeted than the previous versions and that its terms would vary from country to country. Unlike the original ban, the new restrictions do not apply to any U.S. permanent residents, nor to dual nationals who hold a passport from an unrestricted country.

Syrians and North Koreans will face the most complete restrictions, barring virtually all travel, either as immigrants or temporary visitors. North Korea refuses nearly all cooperation with the U.S., administration officials said in written materials explaining the new rules. Syria has a significant terrorist threat and large parts of its territory remain ungoverned.

Iranians, by contrast, would continue to be allowed to enter the U.S. as students under certain circumstances. Nationals of Chad, Libya and Yemen will not be allowed to enter the U.S. on business and tourist visas, but will otherwise be allowed. Somalis will be allowed to enter in certain cases subject to "additional scrutiny."

Venezuelan government officials and their relatives would also not be allowed to enter the U.S. in most cases under the new rules.

Iraqis, who were covered by the first version of the travel ban but exempted in March, would not be covered by the new ban but will face "additional scrutiny to determine if they pose risks to the national security or public safety of the United States," the proclamation said.

The travel ban's history almost directly overlaps with Trump's tenure in the White House. The first version, issued with no notice, caused chaos at airports abroad and in the United States. Facing court challenges and a wave of criticism, the administration backed down from several of the original restrictions when it issued the revised version in March.

Immigration rights advocates, however, continued to say the president had overreached his executive authority and violated constitutional protections against religious bias.

The new restrictions were foreshadowed on Sept.15 when an explosion on a London subway injured several dozen people. At the time, Trump took to Twitter to call for more stringent restrictions and express frustration with the setbacks he had faced.

"The travel ban into the United States should be far larger, tougher and more specific _ but stupidly, that would not be politically correct!" he tweeted.