Predatory dragonflies the size of modern seagulls ruled the air 300 million years ago, and it's long been a mystery how these and other bugs grew so huge.

The leading theory is that ancient bugs got big because they benefited from a surplus of oxygen in Earth's atmosphere. But a new study suggests it's possible to get too much of a good thing: Young insects had to grow larger to avoid oxygen poisoning.

"We think it's not just because oxygen affects the adults but because oxygen has a bigger effect on larvae," said study co-author Wilco Verberk of Plymouth University in the U.K.

"So a larval perspective might lead to a better understanding of why these animals existed in the first place, and maybe why they disappeared."

Baby Bugs Can't Control Their Gases

Fossils show that giant dragonflies and huge cockroaches were common during the Carboniferous period, which lasted from about 359 to 299 million years ago. (Explore a prehistoric time line.)

During this time, the rise of vast lowland swamp forests led to atmospheric oxygen levels of around 30 percent—close to 50 percent higher than current levels.

According to previous theories about insect gigantism, this rich oxygen environment allowed adult bugs to grow to ever larger sizes while still meeting their energy needs. (Related: "Did Rising Oxygen Levels Fuel Mammal Evolution?")

For the new study, Verberk and colleague David Bilton instead focused on how varying oxygen levels affect stonefly larvae, which, like dragonflies, live in water before becoming terrestrial adults. Higher concentrations of oxygen in air would have meant higher concentrations dissolved in water.

The results showed that juvenile stoneflies are more sensitive to oxygen fluctuations than their adult counterparts living on land.

This may be because insect larvae typically absorb oxygen directly through their skin, so they have little or no control over exactly how much of the gas they take in. By contrast, adult insects can regulate their oxygen intake by opening or closing valve-like holes in their bodies called spiracles.

While crucial for life, oxygen can be poisonous in large quantities: Humans exposed to excess oxygen can suffer cell damage leading to vision problems, difficulty breathing, nausea, and convulsions.

It's likely the larvae of many ancient insects also passively absorbed oxygen from water and were not able to regulate their oxygen intake very well—a big danger when oxygen levels were so high.

One way to decrease the risk of oxygen toxicity would have been to grow bigger, since large larvae would absorb lower percentages of the gas, relative to their body sizes, than small larvae.

"If you grow larger, your surface area decreases relative to your volume," Verberk explained.

Lower Oxygen Led to Poor Bug Performance?

The new theory could also explain why giant insects continued to exist even after Earth’s atmospheric oxygen levels began decreasing, he said.

"If oxygen actively drove increases in body mass to avoid toxicity, lower levels would not be immediately fatal, although in time, they will probably diminish performance of the larger insects," since adults would have evolved to require more oxygen and would get sluggish in air with lower levels, Verberk said.

"Such reduced performance will eventually have made it possible for other species to outcompete the giants."