The United States has ended a four-month ban on passengers carrying laptops onboard US-bound flights from certain airports in the Middle East and North Africa, bringing to an end one of the controversial travel restrictions imposed by President Donald Trump’s administration.

Riyadh’s King Khalid international airport was the last of 10 airports to be exempted from the ban, the US department of homeland security (DHS) confirmed in a tweet late on Wednesday local time.

With enhanced security measures in place, all restrictions on large PEDs announced in March for 10 airports/9 airlines have been lifted. — David Lapan (@SpoxDHS) July 19, 2017

Middle East carriers have blamed Trump’s travel restrictions, which include banning citizens of some Muslim-majority countries from visiting the United States, for a downturn in demand on US routes.

In March, the United States banned large electronics in cabins on flights from 10 airports in the Middle East and North Africa over concerns that explosives could be concealed in the devices taken onboard aircraft.

The ban has been lifted on the nine airlines affected – Emirates, Etihad Airways, Qatar Airways, Turkish Airlines, Saudi Arabian Airlines, Royal Jordanian , Kuwait Airways, EgyptAir and Royal Air Maroc – which are the only carriers to fly direct to the US from the region.

A ban on citizens of six Muslim-majority countries – Iran, Libya, Somalia, Sudan, Syria, and Yemen, – remains in place, though has been limited after several US court hearings challenged the restrictions.

“The aviation industry has been trying to come together with a united message to governments and stakeholders about regulation and supporting the industry,” said Will Horton, senior analyst at Australian aviation consultancy CAPA.

“That was dealt a first blow from the travel ban and then a second from the large electronics ban.“

Leading industry group the International Air Transport Association (IATA) criticised the laptop ban as ineffective, as security experts argued that militants could travel to the US via Europe or elsewhere where the restrictions did not apply.

US officials lifted the ban after visiting the 10 airports in Egypt, Morocco, Jordan, the United Arab Emirates, Saudi Arabia, Kuwait, Qatar and Turkey over the past three weeks to confirm new security measures announced last month were being implemented.

On Thursday, the US issued a revised directive to airlines around the world in response to requests that it clarify aviation security measures scheduled to start taking effect this week.

The new requirements include enhanced passenger screening at foreign airports, increased security protocols around aircraft and in passenger areas and expanded canine screening. They affect 325,000 airline passengers on about 2,000 commercial flights arriving daily in the US, on 180 airlines from 280 airports in 105 countries.

Airlines that fail to meet the new security requirements could face in-cabin electronics restrictions.

The United Kingdom continues to enforce a similar in-cabin ban on electronics ban on flights from some Middle Eastern airports. Those restrictions apply to flights from Turkey, Lebanon, Jordan, Egypt, Tunisia and Saudi Arabia.