A tiny crab scuttled around a forest floor, in the time of dinosaurs, minding its own business, when a blob of tree goop oozed onto it. Despite its struggles – during which it may have amputated its own leg in a futile attempt at escape – the sticky tree resin hardened around it, entombing it for almost 100 million years.

"When I saw it for the first time I could not believe my eyes," Harvard paleontologist Javier Luque said. "This spectacular crab looks so modern, like something you may find in [British Columbia] flipping rocks, but it is actually quite old and different from anything seen before, fossil or alive."

Micro-CT scans revealed the amber had preserved the 5-millimeter crab to an exceptional level – even protecting the crab's delicate setae (invertebrate 'hairs') around its slightly open mouthparts.

Fragile gills and intricate compound eyes were still intact for the researchers to examine, and a clear molting line indicated the crab was still alive when drowned in tree resin. One of its legs is detached from its body, possibly due to limb autotomy.

"Cretapsara athanata is the most complete fossil crab ever discovered," said Luque. He and his colleagues named the crab for "the immortal Cretaceous spirit of the clouds and waters" from South Asian mythology.

The fossil was found in a Kachin Province of Myanmar, a region now sadly embroiled in sociopolitical conflict. In recognition and to raise awareness of the unfortunate role the fossil trade is playing in funding the devastating conflict, Luque and colleagues declared they will only explore fossils from before 2017, when the current conflict resumed.

This amber was legally purchased by the Longyin Amber Museum in 2015. Plant tissues and insect poop within it suggest the amber formed on or near the forest floor, an assumption backed up by the lack of sand and layers that would have indicated the amber met water at some point.

However, the stunningly preserved gill anatomy of the crab fossil did not show any signs of land adaptation, like the lung tissue we see in terrestrial crabs today, so the crab was likely amphibious, the team concluded. It possibly lived in freshwater pools in the forest, estuaries, or migrated from the sea like Christmas Island red crabs.

Crab fossils extend back more than 200 million years ago, displaying an incredible diversity in forms since then. This new find from the Early Cretaceous (~99 million years ago) has a mix of early and later evolved features that indicate crabs were already established in non-marine environments back then.

"This crab is telling us a very interesting story about the tree of life of crabs," said Luque. "There is a lot of excitement about crab evolution because evolution has produced crab-like forms, known as carcinization, many times independently."

C. athanata is one of the oldest and most complete finds belonging to the group of true crabs, Brachyura (as opposed to 'false crabs' like hermit crabs) – the same group as the crabs still scuttling about today. But there was a massive 50 million year gap between when molecular and fossil evidence indicated the split between marine and terrestrial/freshwater crabs took place.

"Cretapsara bridges the gap between the molecular DNA split of non-marine crabs from their marine kins (~130 million years ago) and their oldest known fossils (~75–50 million years ago)," explained Luque on Twitter. It also "tells us that crabs have conquered land and freshwater more than 12 times independently!"

Evolution sure loves messing with crabs.

This research was published in Science Advances.