The United States is barring passengers on flights originating in eight Muslim-majority countries from carrying any electronic device bigger than a mobile phone, the Department of Homeland Security said.

Senior US officials told reporters that nine airlines from countries in the Middle East and North Africa had been given 96 hours, beginning at 7:00 GMT on Tuesday, to ban the devices from the cabin.

Affected airports: Cairo International Airport (CAI) - Egypt

Queen Alia International Airport (AMM) - Jordan

Kuwait International Airport (KWI) - Kuwait

Mohammed V Airport (CMN) - Morocco

Hamad International Airport (DOH) - Qatar

King Abdul-Aziz International Airport (JED) - Saudi Arabia

King Khalid International Airport (RUH) - Saudi Arabia

Ataturk International Airport (IST) - Turkey

Dubai International Airport (DXB) - United Arab Emirates

Abu Dhabi International Airport (AUH) - United Arab Emirates

Laptops, e-readers, cameras, tablets, printers, electronic games and portable DVD players are affected by the ban - which applies to direct flights to the US - but they may still be stowed in the hold in checked baggage.

The DHS said the ban was necessary as "terrorist groups continue to target commercial aviation and are aggressively pursuing innovative methods to undertake their attacks, to include smuggling explosive devices in various consumer items.

"Based on this information, Secretary of Homeland Security John Kelly and Transportation Security Administration Acting Administrator Huban Gowadia have determined it is necessary to enhance security procedures for passengers at certain last point of departure airports to the United States," the statement said.

The ban will apply to nonstop flights to the US from 10 international airports serving the cities of Cairo in Egypt; Amman in Jordan; Kuwait City in Kuwait; Casablanca in Morocco; Doha in Qatar; Riyadh and Jeddah in Saudi Arabia; Istanbul in Turkey; and Abu Dhabi and Dubai in the United Arab Emirates, until the threat changes.

"DHS, in close cooperation with our intelligence community partners, selected these airports based on the current threat picture," read the statement, adding that new airports could be added to the list.

"The new procedures remain in place until the threat changes."

The procedures will affect nine airlines: Royal Jordanian Airlines, EgyptAir, Turkish Airlines, Saudi Airlines, Kuwait Airways, Royal Air Maroc, Qatar Airways, Emirates, and Etihad Airways.

Electronic devices will continue to be allowed on all flights originating in the US, whether domestic or international, according to the statement. Approved medical devices may be brought into the cabin after additional screening.

The move comes a week after President Donald Trump's second bid to curb travel from a group of Muslim-majority nations was blocked by the courts .

US officials speaking on condition of anonymity said the ban was to be implemented in response to an unspecified threat the US government learned of several weeks ago.

WATCH: Faultlines - The Muslim Ban

The DHS also cited the 2015 downing of an airliner in Egypt, the 2016 attempted airliner downing in Somalia, and the 2016 armed attacks against airports in Brussels and Istanbul as evidence of groups seeking to target commercial aviation, including by attempting to smuggle explosive devices in various consumer items.

"Terrorist propaganda has highlighted the attacks against aircraft in Egypt with a soda can packed with explosives in October 2015, and in Somalia using an explosives-laden laptop in February 2016," the DHS statement said.

"Terrorists have historically tried to hide explosives in shoes in 2001, use liquid explosives in 2006, and conceal explosives in printers in 2010 and suicide devices in underwear in 2009 and 2012. Within the last year, we have also seen attacks conducted at airports to include in Brussels and Istanbul."

'Baggage theft to skyrocket'

Brian Jenkins, an aviation-security expert at the Rand Corp, said there was concern about inadequate passenger screening or even conspiracies involving insiders - airport or airline employees in some countries.

Trevor Jensen, an aviation consultant and former airline captain, told Al Jazeera that keeping a large number of computers with lithium batteries in the hold also presented safety issues.

"I hope that we are not just knee-jerking here and that this is a credible threat - that the safety issues have also been very carefully thought through."

Jensen questioned why, from a security standpoint, only some airports had been included in the measures.

"If this was a credible threat, I think they would be looking at other airports. Because, why couldn't you fly from Doha, for example, into Zurich, and from Zurich across [to the US] ... there are ways to get around it," he said.

"Looking at some of these legs, the passengers flying on board are business people who do want to work in-flight. Security is first, but it's got to be credible. And we're not getting any more information to support that at the moment," Jensen added.

Another aviation-security expert, Jeffrey Price of Metropolitan State University of Denver, said there was another disadvantage to having everyone put their electronics in checked baggage.

Thefts from baggage would skyrocket, as when Britain tried a similar ban in 2006, he said.