US President Donald Trump has signed a new executive order banning travellers from six Muslim-majority countries after his controversial first attempt was blocked in the courts.

The new executive order will keep a 90-day ban on travel to the United States by citizens of Iran, Libya, Syria, Somalia, Sudan and Yemen, and comes into effect on March 16.

Iraq is no longer included in the ban because the Iraqi government has 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.

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 United States following threats for working with US troops.

The new executive order 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 US courts against the original travel ban, which was signed on January 27, 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.

In addition, the nation’s refugee program will be suspended for 120 days, and it will not accept more than 50,000 refugees in a year, down from the 110,000 accepted last year by the Obama administration.

The order represents an attempt by the Trump administration to tighten security requirements for travellers from nations that officials said represent a terrorism threat.

The new order provides other exceptions not contained in previous versions: for travellers from those countries who are legal permanent residents of the United States, dual nationals who use a passport from another country, those attending diplomatic missions, and those who have been granted asylum or refugee status.