President Donald Trump addresses a joint session of the U.S. Congress on February 28, 2017 in the House chamber of the U.S. Capitol in Washington, DC.

President Donald Trump will remove Iraq from a list of countries targeted in a U.S. travel ban when he is expected to sign a new executive order on Monday after his controversial first attempt was blocked in the courts, a White House source said.

The senior White House official said the new executive order would keep a 90-day ban on travel to the United States by citizens of six Muslim-majority nations — Iran, Libya, Syria, Somalia, Sudan and Yemen.

Iraq was taken off the list of countries in the original order, issued on Jan. 27, because the Iraqi government had imposed new vetting procedures, such as heightened visa screening and data sharing, and because of its work with the United States in countering Islamic State militants, the official said.

Thousands of Iraqis have fought alongside U.S. troops for years or worked as translators since the U.S.-led invasion in 2003. Many have resettled in the United States following threats for working with U.S. troops.

The White House official said the new executive order, which the Republican president was expected to sign on Monday, also ensures that tens of thousands of legal permanent residents in the United States — or green card holders — from the listed countries would not now be affected by the travel ban.

More than two dozen lawsuits were filed in U.S. courts against the original travel ban, and the state of Washington succeeded in having it suspended by the 9th Circuit court of Appeals by arguing that it violated constitutional protections against religious discrimination.

Trump publicly criticized judges who ruled against him and vowed to fight the case in the Supreme Court, but then decided to draw up a new order with changes aimed at making it easier to defend in the courts.