Though the restrictions, effective immediately, will not apply to flights where UK travellers change planes in European airports, it is likely other European countries are considering similar restrictions.

The transport secretary, Chris Grayling, said the UK had been in close touch with the US to understand their approach.

“We understand the frustration that these measures may cause and we are working with the aviation industry to minimise any impact,” he said in a written statement to parliament announcing the change. “Our top priority will always be to maintain the safety of British nationals.”

Grayling said the government was not currently advising against flying to or from the countries affected: “We remain open for business. People should continue to fly and comply with security procedures.”

Government sources stressed the decision was not connected to Donald Trump’s ban on citizens from Muslim-majority countries travelling to the US. It is understood the ban was not regarded by British security agencies as a response to a specific terrorist threat but a general concern about evolving terrorist methods. A government source said Theresa May had held a number of meetings in the past few weeks about air security. A final decision on a ban was taken on Tuesday morning.

Passengers boarding flights to the UK from the countries affected will not be allowed to take any phones, laptops or tablets larger than a normal smartphone – specified as 16cm x 9.3cm x 1.5cm (6.2in x 3.6in x 0.5in).

Any such devices will need to be placed in hold luggage. The restrictions have no time limit and will apply until further notice, a Downing Street spokesman said.

No restrictions will apply to larger smartphones, including the iPhone 7 and Samsung Galaxy S7 Edge, which are under the size restriction. However, many reading devices, including Kindles, are too large and will not be allowed in cabin baggage.

In a statement, British Airways said it advised customers to arrive in “good time” for check-in but flights continue to operate as normal. Thomas Cook said it had been advised that restrictions applied to duty-free purchase of the devices in airport shops. The airline advised customers to “make the necessary arrangements to pack laptops, tablets and e-readers securely into hold luggage to be checked-in before going through security.”

The US ban is vaguer in one sense, in that applies to “anything larger than a smartphone”, but more specific in another, in that applies only to nine Middle Eastern, north African and Turkish airlines, flying from 10 specific airports.

Affected airports include Dubai international and Abu Dhabi international in the United Arab Emirates, which is not one of the countries included in the UK ban. None of the airports are in countries covered by the Trump administration’s travel ban.

In a statement on Tuesday, the US Department for Homeland Security said: “The US government is concerned about terrorists’ ongoing interest in targeting commercial aviation, including transportation hubs over the past two years, as evidenced by the 2015 airliner downing in Egypt; the 2016 attempted airliner downing in Somalia; and the 2016 armed attacks against airports in Brussels and Istanbul.

“Evaluated intelligence indicates that terrorist groups continue to target commercial aviation, to include smuggling explosive devices in various consumer items.”

Airlines have been given until Saturday to enforce the US ban. A UK government spokesman said airlines would also have a number of days to enforce the UK restrictions.

Canada’s transportation minister said on Tuesday that it too was considering prohibiting personal electronics onboard flights from Turkey, the Middle East and north Africa. “We are looking at the information that has been presented to us, we’ll look at it carefully and have a fulsome discussion amongst our colleagues,” Marc Garneau told reporters. “The [threat] information,” he said, “has been provided to us by other intelligence communities.”

The Turkish ambassador to Washington, Serdar Kılıç, described the US and UK moves as unacceptable and impractical, and claimed western intelligence made no attempt to check Istanbul airport before imposing the ban, so giving Turkey no chance to adapt security. Turkey’s transportation minister, Ahmet Arslan, said he was in talks with officials to “stop or soften” the restrictions.

The ban is on electronic devices larger than a normal smartphone. Photograph: Katherine Anne Rose/The Observer

If there are concerns about laptops on board being used as explosives, they said, those same risks could exist in checked baggage. Furthermore, many smartphones, which are not banned, have the same capabilities as larger devices.

“It’s weird, because it doesn’t match a conventional threat model,” said Nicholas Weaver, researcher at the International Computer Science Institute at the University of California, Berkeley. “If you assume the attacker is interested in turning a laptop into a bomb, it would work just as well in the cargo hold. If you’re worried about hacking, a [smartphone] is a computer.”

Bruce Schneier, a US security technologist, said the US rules constituted an onerous travel restriction. “From a technological perspective, nothing has changed between the last dozen years and today,” he said. “That is, there are no new technological breakthroughs that make this threat any more serious today.

“And there is certainly nothing technological that would limit this newfound threat to a handful of Middle Eastern airlines.”

Paul Schwartz, professor at the University of California, Berkeley law school, noted that the 9/11 hijackers had a cell in Hamburg, Germany. “One potential problem with this approach where you single out countries is that you ignore the extent to which the terrorist threat is kind of state-less,” he said. “The terrorists have cells throughout the entire world.”

Mustafa Akyol, a senior visiting fellow at the Freedom Project at Wellesley College, Massachusetts, said the US ban “has something to do with Islamophobia, in the sense of bias and discrimination against all Muslims. Because instead of tracing dangerous individuals, it treats certain Muslim-majority nations as a threat to the US.

“On the other hand, it will be interesting to see how the Turkish government will respond to this decision. So far, Ankara has treated President Trump’s take on Muslims very leniently, to the level of passionately supporting Trump against American liberals. Maybe now they can wake up a bit and realize that Trump’s take on Muslims can be a real problem.”

In Beirut, news that Lebanon would be one of six countries subject to a British cabin ban on large electronics, was met with surprise.

“We have come to expect this from Trump – the court jester of global politics,” said Issa Falaha, a Beirut banker. “Even Gaddafi thought before he spoke.

“But why the UK would do this is more puzzling. There are already two physical examinations of computers for British Airways flights leaving Beirut. Anything more than that seems to be redundant. I hope Britain isn’t blindly following Trump, but in this new world order, anything is possible.”

In Egypt, Gamal Ramadan, a merchant from Alexandria, said: “We lost a plane last year to terrorism, so there is a threat. But it’s off that all of these countries [in the US ban] are not on the travel ban list. It is random, and discriminatory.”

The new regulations come as leading members of the coalition in the fight against the Islamic State group meet in Washington, including a number of ministers from Arab and Middle East nations as well as foreign secretary Boris Johnson and US secretary of state Rex Tillerson.