WASHINGTON — President Trump on Sunday issued a new order indefinitely banning almost all travel to the United States from seven countries, including most of the nations covered by his original travel ban, citing threats to national security posed by letting their citizens into the country.

The new order is more far-reaching than the president’s original travel ban, imposing permanent restrictions on travel, rather than the 90-day suspension that Mr. Trump authorized soon after taking office. But officials said his new action was the result of a deliberative, rigorous examination of security risks that was designed to avoid the chaotic rollout of his first ban. And the addition of non-Muslim countries could address the legal attacks on earlier travel restrictions as discrimination based on religion.

Starting next month, most citizens of Iran, Libya, Syria, Yemen, Somalia, Chad and North Korea will be banned from entering the United States, Mr. Trump said in a proclamation released Sunday night. Citizens of Iraq and some groups of people in Venezuela who seek to visit the United States will face restrictions or heightened scrutiny.

Mr. Trump’s original travel ban caused turmoil at airports in January and set off a furious legal challenge to the president’s authority. It was followed in March by a revised ban, which expired on Sunday even as the Supreme Court is set to hear arguments about its constitutionality on Oct. 10. The new order — Chad, North Korea and Venezuela are new to the list of affected countries and Sudan has been dropped — will take effect Oct. 18.