The laptop ban is over.

Passengers flying into the United States from airports in 10 Muslim-majority countries affected by the ban may now take their laptops and other large electronic devices into the cabin with them, the Department of Homeland Security confirmed on Thursday.

Security officials imposed the ban in March, warning then that the Islamic State was developing bombs that could be hidden in portable electronic devices. But the airlines and airports affected by the ban have all complied with the initial phase of the new Homeland Security standards, allowing the prohibition to be lifted, the department said.

The ban on portable devices created a headache for carriers flying into the United States from the affected airports. Many airline passengers expect to use laptops and tablets as a matter of course, for both entertainment and to get work done. Analysts feared it would reduce the number of people visiting the United States from the 10 countries, which stretched from North Africa to the Mideast and into Turkey.

The commercial aviation industry expressed alarm after security officials said in May that they were considering expanding the ban to all flights to the United States from Europe, a huge market for both leisure and business travelers.