Passengers flying to the U.S. from foreign airports still affected by the electronics ban may soon be able to bring their laptops on board the plane.

The Department of Homeland Security on Tuesday said if security measures are increased at the airports in coming days and weeks, the laptop restriction will be removed.

In March, the U.S. banned electronic devices larger than a smartphone from the cabin on flights coming from 10 airports in eight countries in the Middle East and North Africa. Officials feared that the devices could be used to smuggle explosives on board.

Related: Laptop ban lifted for Abu Dhabi airline

Earlier this month, U.S. officials lifted the ban for passengers coming from Istanbul, Turkey; Doha, Qatar; Amman, Jordan; Abu Dhabi and Dubai in the United Arab Emirates; and Kuwait after airports and airlines implemented heightened security measures.

Egypt Air said in a statement on Wednesday that restrictions on its flights from Cairo to New York had also been lifted.

While authorities have never described the additional measures in detail, DHS Secretary of Homeland Security John Kelly said in June that the security included enhanced screening of both passengers and electronic devices.

Related: Qatar Airways is latest carrier to have laptop ban lifted

The electronics ban remains in effect for U.S.-bound flights operated by Royal Air Maroc from Casablanca, Morocco, and Saudia from Jeddah and Riyadh.

Saudia, the national carrier for Saudi Arabia, said last week that it was working to implement the DHS measures and aimed to have the ban lifted by July 19. DHS spokesman David Lapan on Tuesday said he would not discuss security changes to any flights affected by the ban.

Lapan says the ban can be lifted after airlines tell U.S. officials that they have the new security measures in place. American authorities then will need to verify compliance.

Lapan added that all airlines with a last point of departure outside the U.S. will need to need to put the security upgrades in place in order to avoid facing a similar electronic bans. If they don't, they could even risk having U.S.-bound flights suspended, he added.

The "nature of the threat remains," he said.

-- Zahraa Alkhalisi and Jethro Mullen contributed to this story.