President Donald Trump on Monday signed a revised version of his executive order to impose temporary travel restrictions on residents of six countries the Obama administration and Congress had designated as posing risks of terrorism.

The new order addresses many of the concerns that followed Trump’s announcement of the original directive five weeks ago. Federal courts froze that order, which resulted in confusion and chaos at airports.

“The executive order signed by the president protecting the nation from foreign terrorist entry is a vital measure for strengthening our national security,” Secretary of State Rex Tillerson told reporters at a press conference announcing the new order.

As the administration evaluates how to enhance vetting procedures, Trump’s new order bars for 90 days the issuance of new visas for citizens and residents of six countries. It also pauses for 120 days resettlement to the U.S. of refugees from anywhere in the world.

Syrian refugees no longer are subject to an indefinite ban, as they were in Trump’s first order.

The 90-day travel restriction applies to Iran, Syria, Somalia, Sudan, Yemen, and Libya, six Muslim-majority and terrorism-prone countries that were contained in the original order.

However, Iraq is no longer included on that list after the Defense and State departments convinced the White House that the country is crucial to the fight against the Islamic State, the terrorist group also known as ISIS.

The Iraqi government agreed to share more data and intelligence about its citizens with the U.S.

>>> Experts Differ on Whether Trump’s New Travel Ban Makes America Safer

When the Trump administration lifts the suspension on refugees, the number of refugees allowed into the U.S. will be capped at 50,000 for fiscal year 2017. The U.S. admitted 84,995 refugees in fiscal year 2016, the most since 1999.

Trump signed the new order behind closed doors, and three of his Cabinet secretaries held a short press conference to announce it.

Joining Tillerson were Attorney General Jeff Sessions and John Kelly, secretary of the Department of Homeland Security.

“The Department of Justice believes that this executive order, just as the first executive order, is a lawful and proper exercise of presidential authority,” Sessions said.

The new order omits language specifying that religious minorities, such as Christians, will receive preference for admission to the U.S.

Despite the changes, opponents—some of whom called the original order a “Muslim ban”—vowed to challenge the new order in court.

Kelly emphasized that in contrast to the first order, relevant Cabinet agencies and Congress had been consulted on the new policy.

The homeland security secretary said “there should be no surprises” with the revised order, alluding to the rushed Jan. 27 rollout of the first one, which became effective immediately and initially applied even to travelers en route to the U.S. who had valid visas or were legal residents.

The government estimated that 60,000 visa holders were blocked from entering the country under the initial order.

The White House later issued guidance clarifying the original order did not apply to green card holders—or legal permanent residents—and it granted waivers to Iraqis who assisted the U.S. military and to refugees who already had been screened prior to the order being signed. But that language was not in the executive order itself, as judges noted in their critiques of the policy.

“We are going to enforce the law respectfully, humanely, and with professionalism, but we will enforce the law,” Kelly said of implementing the new order.

The order takes effect March 16, and does not apply to individuals from the six countries who had valid visas at 5 p.m. ET on Jan. 27. In addition, travelers who hold valid visas and are in transit still will be allowed to enter the U.S.

The order also provides other exceptions not contained in the initial order for travelers from the six countries who are legal permanent residents of the United States, dual nationals who use a passport from another country, and individuals who already have been granted asylum or refu­gee status.

Individuals from the six affected countries—and potential refugees—may apply for waivers to enter the U.S. in particularly urgent circumstances.

In another concession, individuals currently in the U.S. who plan to travel abroad to one of the six countries will be able to return at the end of their trip.