Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

The U.S. and British ban on electronic devices in the cabins of inbound flights from certain countries stemmed from a new intelligence analysis suggesting that terrorists could put bombs in laptops in a way that would allow the devices to briefly power on, fooling security screeners, NBC News has learned.

Intelligence officials say the restrictions imposed earlier this month were based in part on analyzing past attacks and developing an idea of current terrorist capabilities. The analysis also suggests that terror groups have gotten their hands on airport security screening devices in order to probe their weaknesses, officials told NBC News.

For the past week, passengers on flights from 10 airports in the Middle East and North Africa to the U.S. have been forbidden to carry onboard any electronic devices larger than a cell phone.

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

Related: U.S. Restricts Laptops, iPads in Carry-On Bags from 10 Airports

Now, U.S. officials say one of the reasons for the restrictions is a new government analysis suggesting that ISIS and other terrorists have developed the means to conceal explosives in laptop computers in a way that could elude security screening.

A senior U.S. official says it's the result of analyzing recent attacks on airliners — including the bombing of a passenger plane last year in Somalia.

Using parts found from that and other recent bombing attempts, FBI experts have reverse-engineered how those bombs might have worked. The officials say they're worried the resulting laptops could contain enough power to briefly power up, possibly fooling screeners.

Related: What's Behind the Ban On Electronics on Some Overseas Flights?

Forcing passengers to put their electronics rather than carry them onboard, security experts say, subjects them to a different, more thorough machine.

TSA said in a statement that "evaluated intelligence indicates that terrorist groups continue to target commercial aviation, to include smuggling explosive devices in electronics."

U.S. officials say they also believe terror groups are using some airport-style screening devices — which turn out to be widely available — to test their explosive designs.

While this provides more clarity about why the U.S. and the British imposed these restrictions earlier this month, it doesn't change the assessment of the threat. And there are still no plans to impose these restrictions on domestic flights.