An estimated six million species of insect—maybe even more—call Earth home. Yet for some reason, none of them are found in the ocean. Scientists have come up with a few possible explanations, and a popular one posits that the insect respiratory system would implode from water pressure.

Now, however, the deep-diving larvae in East Africa are challenging that notion. In a study published in the journal Science on July 23, researchers report that the larvae of the lake fly Chaoborus edulis regularly dive more than 650 feet below the surface of Lake Malawi thanks to strong air sacs that contain a stretchy protein.

“This was a big surprise,” says study co-author Philip Matthews, a zoologist at the University of British Columbia in Canada, in a statement. “It tells us pressure isn’t the barrier we thought it was to insect life colonizing the ocean.”

The findings highlight an extraordinary ability in the insects and could inspire new types of materials.

For the study, Matthews and his colleagues deployed an underwater sonar system in Lake Malawi, where billions of C. edulis live. The data provided a window into the critters’ daily lives. In the morning, larvae descend to the lake’s hypolimnion—the deepest, coldest layer of water—at an average rate of about 25 feet per hour. The young bugs were recorded reaching depths of up to roughly 850 feet.

In the afternoon, they begin to rise toward the surface at an average rate of 65 feet per hour, finishing the journey by late evening. The cycle seems to help the insects evade predators.

“They can regulate their buoyancy in such a way that they can hide from the fish during the day by either sinking down, going incredibly deep, to find a region where there’s no oxygen. The fish can’t chase them in there,” Matthews tells Flora Lichtman on an episode of “Science Friday.” “Then they can float up at night when the fish find it really hard to see them and eat them. And then they can spend their time eating the zooplankton up in the surface waters at night.”

But how does C. edulis complete the trip? Studying some of them in the lab revealed their secret: a highly elastic protein called resilin. The larvae’s air sacs are covered in alternating bands of resilin and stiff cuticle, giving the respiratory structures the ability to contract and expand like an accordion to change the animals’ buoyancy. The structures change in response to alterations in pH level in the walls of the air sacs.

Then, to investigate how well the insect can withstand pressure, the scientists placed larvae and pupae—the next developmental stage—of C. edulis and three other species belonging to the Chaoborus genus in water-filled pressure chambers. C. edulis could withstand increasingly higher pressures as it developed, with its pupae able to endure water pressure up to 1,519 feet deep. The other species could only handle much shallower depths. That’s because C. edulis’ air sacs were stronger than those of the other species, the team found, and the strength correlated with the maximum depth of each animal’s environment.

Did you know? More insect species than we thought

Many recent insect estimates have come to the consensus that Earth has roughly six million species. But in June, researchers reported that our planet might actually host between 14 million and 20 million insect species.

The study is “beautiful,” says Natasha Mhatre, a biologist at the University of Western Ontario in Canada who wasn’t involved in the work, to Mary Randolph at Scientific American. Connecting the mechanics of the air sacs, biochemistry and ecology, she adds, “is what’s so sweet about this paper.”

What’s more, the findings could inspire new technologies, says study co-author Evan McKenzie, a zoologist at the University of British Columbia, to Margherita Bassi at Popular Science. Chaoborus resilin could be “of great interest to material science where it could be developed as a dynamic material that morphs its shape in response to changes in its chemical environment.” For example, its properties could be harnessed to develop artificial muscles or valves activated by different pH levels, per the statement.

Still, the study leaves the absence of ocean insects an ongoing mystery. Perhaps challenges of living in salt water or a lack of available ecological niches are stopping insects from moving into the ocean, Matthews says in the statement.

“Crustaceans, which are distant cousins of insects, still fill those niches,” he adds, “so the insects can’t just move back into an empty apartment—the tenants are still there.”