The Trump administration updated and expanded its travel ban Sunday night, hours before it was set to expire. The new rules now apply to visitors from eight countries – including two that do not have majority-Muslim populations.

Trump’s original travel ban, signed as an executive order at the beginning of his presidency, was criticized in part for being a Muslim ban.

The new restrictions apply to visitors from Iran, Libya, Syria, Yemen and Somalia, which were on the original travel ban, as well as Chad, North Korea and Venezuela. The restrictions on Chad and North Korea are a broad ban on nationals from those countries seeking entry to the U.S., while the restrictions on Venezuela apply only to government officials and their families. Sudan, which was also listed on the original travel ban, has been dropped from the order because it has cooperated with the U.S. government’s security and information-sharing requirements, administration officials said.

“Following an extensive review by the Department of Homeland Security, we are taking action today to protect the safety and security of the American people by establishing a minimum security baseline for entry into the United States,” Trump said in a statement. “We cannot afford to continue the failed policies of the past, which present an unacceptable danger to our country. My highest obligation is to ensure the safety and security of the American people, and in issuing this new travel order, I am fulfilling that sacred obligation.”
The new restrictions are set to take effect on Oct. 18, and will not affect anyone who already holds a U.S. visa.

Trump’s original travel ban was met with widespread protests and was challenged in court, with plaintiffs arguing that Trump was attempting to implement a campaign promise to ban Muslims from entering the country. The Supreme Court was set to hear oral arguments on the legality of the travel ban on Oct. 10, but in light of the administration’s new order, asked both sides to file new briefs on the impact of the new restrictions. The new briefs are due Oct. 5, and should address whether Trump’s new policy renders moot the central dispute over the travel ban order that Trump previously issued.