Imagine for some reason you find yourself walking amidst a hail of bullets. What would you rather be wearing?

A heavy suit of dense steel armor or ... foam?

You're probably not going to want to take your chances either way. But if you're covered in foam, rather than steel, you will at least have a chance to make the smart play — and run like heck.

That's because foam, of course, is considerably lighter and more flexible than steel.

But what about that "hail of bullets" part?

Well, scientists at North Carolina State University may have finally developed a material that gives you all that foamy flexibility — as well as the bullet-stopping brawn of heavy steel.

They're calling it Composite Metal Foam, or simply CMF.

Their findings, published in the journal Composite Structures last month, describes a new kind of armor that's lightweight, flexible and can withstand a barrage of bullets up to 50 caliber. Those bullets are commonly considered the biggest and most deadly and are found in sniper rifles and machine guns.

A close-up of CMF foam with bullet dents. The foam is interspersed with metal and injected with pockets of air. (Photo: North Carolina State University)

The researchers built a prototype by injecting foam with metals like aluminum and steel — and injected with hundreds of hollow air pockets. They combined it with a ceramic faceplate, as well as a thin back plate made of aluminum.

Then they let the bullets fly.

In laboratory tests, the material fared remarkably well against bullets, fired at anywhere from 1,600 feet per second to nearly 3,000 feet per second.

Among the types of ammo the layer faced, researchers found the standard "ball-type" bullets were the most easily rebuffed. The foam swallowed between 72 and 75 percent of their kinetic energy. That's the energy transferred to your body when something slams into you. Armor-piercing rounds saw between 68 and 78 percent of their kinetic energy absorbed.

And the actual bullet, rather than its killing energy, was halted in its tracks in the experiment, at least when fired at speeds up to 2,600 feet per second.

Researcher Afsaneh Rabiei holding composite metal foam.. Lead researcher Afsaneh Rabiei is also the inventor of composite metal foam. (Photo: North Carolina State University)

So you may have noticed there's a small but troubling margin for mortality here. An absorption rate of 75 percent could still leave you 25 percent dead — which by even the most basic mathematical reckoning leaves you entirely deceased.

Still, we're talking about stopping most bullets with something as light and mobile as foam. And, the researchers added, the foam was effective at blocking X-rays, gamma rays and neutron radiation, as well as extreme fire and heat.

"The CMF armour was less than half the weight of the rolled homogeneous steel armour needed to achieve the same level of protection," Afsaneh Rabiei, an engineer and materials scientist at North Carolina State University, noted in a press release.

Of course, military buffs are salivating at the prospect of soldiers and vehicles draped in bullet-shredding, bomb-suppressing foam. For a little while at least, we may get to see an army of Pillsbury Doughboys squaring off in battle — until armies inevitably develop new ways to kill each other.

But the real winner here might be you.

Imagine the places you would be able to visit that are far from the tourist-trodden path. Real war-torn hell holes. Just bring a camera, a selfie stick — and, of course, your bullet-proof metallic foam suit.

You can even leave the sunscreen at home.

Scientists have built a foam armor that stops bullets as well as heavy steel
A newly developed metallic foam can stop even the biggest of bullets, but as with steel, there's still a margin for death.