The animals can run to the edge of a ledge or cliff and keep right on going, researchers found, grabbing the edge with their hindmost feet then swinging underneath to grab the underside and hang upside down, safe from a potential attacker.
Jean-Michel Mongeau and his colleagues at the University of California, Berkeley, studied this ability in both cockroaches and gekkos, NewScientist.com reported Friday.
Mongeau filmed cockroaches doing the edge "flip."
"To the naked eye, it wasn't clear what was happening, but when we filmed them with a high-speed camera and slowed it down, we were amazed to see that it was the cockroach's hind legs grabbing the surface that allowed it to swing around under the ledge," he said.
Mongeau and his team filmed the same escape tactic in wild geckos in Singapore.
They then teamed up with the university's robotics group to apply their knowledge about this swing motion to modify a small six-legged robot so it could negotiate ledges in this way using Velcro on its legs.
This motion could be developed into highly mobile search-and-rescue robots, they said.
"That's the challenge now in robotics, to produce robots that can transition on complex surfaces and get into dangerous areas that first responders can't get into," Berkeley biologist Robert Full said.
2014: The Year in Music [PHOTOS]