(Monica Akhtar,Dani Player/The Washington Post)

Britain joined the United States on Tuesday in barring passengers traveling from airports in several Muslim-majority countries from bringing laptops, tablets and other portable electronic devices on board with them when they fly.

The U.K. ban applies to six countries, while the U.S. ban covers 10 airports in eight Muslim-majority countries.

Fliers can still travel with these items, but they must be packed in their checked baggage on U.S.- and U.K.-bound flights from airports across the countries, including busy hubs in Istanbul, Dubai and Doha, Qatar.

The British ban also includes some cellphones and is expected to apply to all airports in the six nations. The countries included in the British ban are Turkey, Lebanon, Jordan, Egypt, Tunisia and Saudi Arabia.

The U.S. restrictions were prompted by a growing concern within the government that terrorists who have long sought to develop hard-to-detect bombs hidden inside electronic devices may have put renewed effort into that work, according to people familiar with the matter, who spoke on the condition of anonymity because they were not authorized to talk about it. U.S. officials have been discussing whether to issue new security restrictions for some flights for the past two weeks, they said.

Officials have said that in 2014, U.S. authorities were increasingly worried that suspected bombmaker Ibrahim Hassan al-Asiri, who was allegedly instrumental to al-Qaeda’s Yemen branch in several bomb plots, might be helping terrorists in Syria develop new, harder-to-detect explosive devices.

John Pistole, a former senior FBI official who also led the Transportation Security Administration during the Obama administration, said Asiri is a major concern for U.S. counterterrorism officials.

“To my knowledge, he’s still out there, and he shares his recipes with a number of people,’’ Pistole said. Restrictions like those announced this week, he said, “are a way of trying to be as tailored as much as possible to reduce the risk.’’

Pistole, now president of Anderson University in Indiana, said aviation security officials are particularly concerned about explosive devices built with non-metallic materials, because most of the world’s airports lack the screening measures to detect such bombs.

New limitations on carry-on items “are both an actual physical deterrent and an overall deterrent so the bad guys see this and say, ‘They’re onto us.’ That’s a win for the good guys,” Pistole said, “because then you have time to push the terrorists off to another location, another time, another type of attack. It gives law enforcement and security services more opportunity to identify and disrupt plots.”

So why not ban electronic devices from planes entirely? People familiar with the discussions said the restrictions were designed to defeat the particular type of threat that is of greatest concern: the possibility that terrorists could smuggle explosives inside electronics and manually detonate them once on a plane. In the case of the “underwear bomber’’ plot of 2009, for example, the would-be attacker had to mix two chemicals to create the explosive once he was on board the airliner.

(Daron Taylor/The Washington Post)

Federal officials initially described the ban as indefinite. But David Lapan, a spokesman for the Department of Homeland Security, said the directive runs until Oct. 14 and could be extended for another year “should the evaluation of the threat remain the same.”

James Norton, who was a ranking official at the Department of Homeland Security when a ban on liquids went into effect just over a decade ago, said a sudden change such as this signals a significant threat.

“It seems fairly urgent,” said Norton, who now runs a homeland security consulting firm. “My initial reaction is this is based on some sort of information that the intelligence community came across as a whole. They are trying to address it working with the airlines and the countries directly, trying to implement some sort of a plan.”

The ban on liquids was implemented Aug. 10, 2006, after British and U.S. intelligence uncovered a plot to simultaneously blow up as many as 10 U.S.-bound passenger jets with liquid explosives hidden in carry-on luggage. Authorities arrested 24 suspects that day and launched new security measures that snarled air traffic. Travelers had to undergo special inspections after drinks and most other liquids and gels were banned as carry-on items (later rules allowed small amounts of liquids and gels, but with tight restrictions).

“That happened overnight based on a bunch of arrests on an incredible threat,” Norton said. This week’s new rules suggest an urgency to bar devices from U.S.-bound aircraft from those specific countries.

“Evidence can be anything,” Norton said. “It is hard to know until they make some sort of announcement in terms of why they are doing this — why they picked those countries and those flights. My guess is, just like with the liquid ban, that they came across a potential threat.”

The decision to announce the British ban was made during a meeting on aviation security measures Tuesday by British Prime Minister Theresa May, who had chaired similar meetings over the past few weeks. British authorities said they contacted U.S. officials before the announcement.

It’s unclear when the British ban will take effect. “The affected airlines have already been informed, and we expect the measures to be in place in the next couple of days,” a government spokesman said. He added that six British and eight foreign carriers will be affected.

A spokesman for the prime minister’s office said the measures were based on the “same intelligence the U.S. relies on.”

British terrorism experts were baffled by the move, however, and said the differing specifics of the American and British bans seemed contradictory, especially in regard to the selection of countries. The U.S. ban includes airports from several nations that are not affected by the British restrictions.

This “may be linked to the Trump administration’s emphasis on displaying an abundance of caution when addressing the threat of terrorism to the U.S., regardless of the potential impact this may have on relations with partners and allies,” said Daniel Falkiner, a London-based security analyst.

“In contrast, the U.K. has very close political and security ties with the gulf states, for example, which may mean London is more content than Washington is with the security protocols at major regional hubs like Dubai,” Falkiner said.

Lapan, the DHS spokesman, said it would be up to British officials to explain why they included flights from countries not covered by the U.S. ban.

“Outside of intel or threat assessments, governments make decisions on various factors affecting their countries and residents,” Lapan said via email.

Security experts also said it would be extremely unusual for the British government to announce such extensive restrictions — affecting flights from locales favored by British tourists, such as Tunisia and Egypt — without the emergence of new details in recent weeks.

But another U.S. security expert questioned how the ban was implemented.

Why should I feel safer if the laptop is stowed in the belly of the plane and the perpetrator can use his iPhone to set if off?” asked a senior official with an international travel organization. “I’m not personally privy to what [information] the TSA or DHS has, but I just don’t get it.”

The official, who spoke on the condition of anonymity because he works in the industry, said the logistics of enforcing the ban will be daunting, particularly in instances where passengers take connecting flights elsewhere in the world before boarding a plane bound for the United States.

“You’ve got to wonder, if somebody’s connecting and doesn’t have access to his checked bag to put his laptop in, what does he do?” the official asked. “I guess people will figure out that if you’re connecting in Casablanca, you’d better have your laptop in your checked bag.”

Some civil rights activists raised concerns about the intelligence behind the ban.

“The administration hasn’t provided a security rationale that makes sense for this measure targeting travelers from airports in Muslim-majority countries,” said Hina Shamsi, director of the ACLU’s National Security Project. “Given the administration’s already poor track record, this policy sends a signal of discriminatory targeting and must be heavily scrutinized.”

Under the restrictions, travelers to the United States from 10 mostly Middle Eastern airports will be required to put all personal electronic devices larger than a cellphone or smartphone in their checked baggage. U.S. airlines are not affected by the ban because none offer direct U.S.-bound flights from the affected airports.

Ten airports in eight countries — Egypt, Jordan, Kuwait, Morocco, Qatar, Turkey, Saudi Arabia and the United Arab Emirates — are affected. Officials said the airports were selected based on the “current threat picture.”

Officials said airlines will have 96 hours to comply with the restrictions. Carriers that fail to do so risk losing their authorization to operate in the United States.

The airports are: Queen Alia International Airport (AMM) in Jordan, Cairo International Airport (CAI) in Egypt, Istanbul Ataturk Airport (IST) in Turkey, King Abdulaziz International Airport (JED) and King Khalid International Airport (RUH) in Saudi Arabia, Kuwait International Airport (KWI) in Kuwait, Mohammed V International Airport (CMN) in Morocco, Hamad International Airport (DOH) in Qatar, and Dubai International Airport (DXB) and Abu Dhabi International Airport (AUH) in the United Arab Emirates.

Officials said the change will affect passengers who travel on about 50 daily flights. Neither the U.S. nor British ban includes crew members.

Turkey’s transport minister, Ahmet Arslan, criticized the ban, telling reporters in Ankara that it was not “beneficial” for passengers and that Turkey already has stringent security measures in place, according to Turkey’s semiofficial Anadolu news agency. He added that Turkish officials had spoken about the regulations with their American counterparts and were discussing whether the Trump administration should “step back.”

The ban was first made public Monday afternoon — not by administration officials but in a tweet sent by Royal Jordanian Airlines. Initially, U.S. officials declined to comment on the report, saying only that they would provide an update “when appropriate.” The official announcement came early Tuesday.

U.S. officials began outlining the new rules to carriers Sunday.

The International Air Transport Association, which represents international carriers, issued a statement Tuesday saying a number of airlines had been contacted by the TSA in regard to the new U.S. restrictions.

“IATA is working with its members and the TSA to achieve greater clarity on required actions,” the statement said. The group asked travelers going through the affected airports to add extra time to their travels.

“Safety and security is the top priority of everyone involved in aviation,” the statement said. “Airlines comply with government requirements and they can do this most effectively when measures are well coordinated.”

Barrett and Lazo reported from Washington. Lori Aratani, Ashley Halsey and Carol Morello in Washington and Zeynep Karatas in Istanbul contributed to this report.