Donald Trump will remove Iraq from a list of countries targeted in a US travel ban when the US president 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 US 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 27 January, because the Iraqi government had imposed new vetting procedures, such as heightened visa screening and data sharing, and because of its work with the US in countering Islamic State (IS) militants, the official said.

Iraq in return expressed "deep relief" at Trump's decision to remove Iraq from the list, the Iraqi foreign ministry said in a statement on Monday.

"The decision is an important step in the right direction, it consolidates the strategic alliance between Baghdad and Washington in many fields, and at the forefront of their war on terrorism," the statement said.

Thousands of Iraqis have fought alongside US troops for years or worked as translators since the US-led invasion in 2003. Many have resettled in the US following threats for working with US 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 US - 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 US 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 criticised 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.

Delay on implementation

While the first order imposed restrictions immediately, the new directive would have an as-yet undefined implementation delay to limit the disruptions that created havoc for some travellers, the official said.

Refugees who are "in transit" and have already been approved would be able to travel to the United States.

Trump's original order barred travellers from the seven nations from entering for 90 days and all refugees for 120 days. Refugees from Syria were to be banned indefinitely, but under the new order they are not given separate treatment.

"This executive order has scrapped that division and the indefinite suspension, and has collapsed them into a single category of a 120-day suspension," the official said.

During the presidential election campaign last year, Trump called for a temporary ban on all Muslims entering the US. He said his initial executive order issued just a week after he took office was needed to head off attacks by militants.

However, the White House official said the new order was based on national security considerations and had nothing to do with religion.

"It is substantially different from the first order yet it will do the same thing in this important way: It will protect the country and keep us safe," the official said. The administration would also reset the clock on the 90-day travel ban.

The official said US government agencies would determine whether Syria or other nations had made sufficient security improvements to be taken back into the refugee admissions programme.

90 days to comply

The new order launches a 90-day period for the Department of Homeland Security (DHS) to define a new series of requirements for countries to have full participation in US entry programmes.

For countries that do not comply, the US State Department, the DHS and intelligence agencies can make recommendations on what, if any, restrictions should be imposed.

"It's not an all-or-nothing scenario," the official said.

The new order spells out detailed categories of people eligible to enter the United States, such as for business or medical travel, or people with family connections or who support the United States.

"There are a lot of explicit carve-outs for waivers and given on a case-by-case basis," the official said.

Many of Trump's supporters approved of the initial ban but critics said it was unjustified and discriminatory.

US technology firms that had employees affected by the executive order also complained, and some members of Trump's cabinet urged him to remove Iraqis and green card holders from the list of those affected.

The White House was widely criticised for not working with the State Department, the Department of Justice, the Department of Homeland Security and allies in Congress in drawing up the initial ban.

The confusion that caused led to a weekend of chaos, legal wrangling and protests in cities and at major airports across the United States.