The US and UK are banning laptops from cabin baggage on flights from certain countries in the Middle East and North Africa, as well as Turkey.
The ban on electronic devices larger than a smartphone is being imposed as an anti-terrorist precaution.
It covers inbound flights on nine airlines operating out of 10 airports. Phones are not affected.
The British ban, announced hours after the American measure, is similar but applies to different airlines.
Downing Street said airline passengers on 14 carriers would not be able to carry laptops in cabin luggage on inbound direct flights from Turkey, Lebanon, Jordan, Egypt, Tunisia and Saudi Arabia.
The Turkish government said the US ban was wrong and should be reversed.
Large electronic devices will still be allowed on board in checked baggage.
Canadian Transport Minister Marc Garneau said his country was also considering restrictions on electronics in the cabins of planes.
Which flights are affected?
British Airways and EasyJet are among the airlines affected by the UK ban.
The nine airlines affected by the US ban are Royal Jordanian, EgyptAir, Turkish Airlines, Saudi Arabian Airlines, Kuwait Airways, Royal Air Maroc, Qatar Airways, Emirates and Etihad Airways.
They have been given a deadline of 07:00 GMT on Saturday to impose the ban, US officials said, adding that the restriction had no end date.
However, an Emirates spokeswoman told Reuters news agency the airline understood that the US directive would come into effect on 25 March and remain valid until 14 October 2017.
The airports affected are:
Mohammed V International, Casablanca, Morocco
Ataturk Airport, Istanbul, Turkey
Cairo International Airport, Egypt
Queen Alia International, Amman, Jordan
King Abdulaziz International, Jeddah, Saudi Arabia
King Khalid International, Riyadh, Saudi Arabia
Kuwait International Airport
Hamad International, Doha, Qatar
Abu Dhabi International, United Arab Emirates
Dubai International, United Arab Emirates
The restriction is based, we are told, on "evaluated intelligence", BBC security correspondent Frank Gardner writes.
That means that US intelligence has either intercepted discussion of a possible extremist plot or has been passed word of one by a human informant.
The Middle Eastern and North African airports affected are nearly all ones with close, friendly relations with Washington, so this will be seen by some as a drastic and unpopular measure. Wealthy Gulf Arab business leaders flying to the US, for example, will no longer be able to work on their laptops mid-flight.
But aviation security experts were alarmed by an incident in Somalia last year when the insurgent group al-Shabaab smuggled an explosive-filled laptop on a flight out of Mogadishu, blowing a hole in the side of the plane. The aircraft was still low enough that the pilot was able to land the plane safely.
What happened on the bombed Somali plane?
How is the ban being justified?
In a statement, the DHS cited attacks on planes and airports over the past two years.
Bombs, it said, had been hidden in such items as a soft drink can, in the downing of a Russian airliner over Egypt in October 2015 with the loss of 224 lives, and the laptop used in the unsuccessful Somali attack last year.
"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," it noted.
Image copyright AP
Image caption So-called Islamic State said it bombed the Russian plane over Egypt
"Evaluated intelligence indicates that terrorist groups continue to target commercial aviation, to include smuggling explosive devices in various consumer items," the DHS said.
A British Government spokesperson said: "The additional security measures may cause some disruption for passengers and flights, and we understand the frustration that will cause, but our top priority will always be to maintain the safety of British nationals."
Will the ban be effective?
Turkish Transport Minister Ahmet Arslan told reporters the ban was "not a right move".
Image copyright Reuters
Image caption Ataturk Airport, which has stringent security checks in place, was attacked last year
"We particularly emphasise how this will not benefit the passenger and that reverse steps or a softening should be adopted," he added.
Philip Baum, editor in chief of Aviation Security magazine, told the BBC: "If we cannot, in 2017, distinguish between a laptop that contains an IED [improvised explosive device] and one that does not, then our screening process is completely flawed.
"And encouraging people to check laptops, and other such items, into the luggage hold simply makes the challenge even harder. Cabin baggage can, at least, be inspected piece by piece and the accompanying passenger questioned."
He pointed to a bomb plot in 2010, when extremists planted explosives on printer cartridges shipped from Yemen:
"Surely the lesson... was that bulk screening is not always up to the task and that common sense should rule - the devices were found due to an alert Emirati security guard, not by X-ray or trace detection technologies."
Is this linked to the Trump travel ban?
Officials quoted by Reuters news agency said the new measure was not connected to US President Donald Trump’s efforts to ban travellers from six Muslim-majority states.