This story was originally published by The Guardian and appears here as part of the Climate Desk collaboration.

If you can keep your head when all about you are losing theirs, then it’s unlikely you are a sacoglossan sea slug (apologies to Rudyard Kipling).

Scientists in Japan have discovered that this species of sea slug can decapitate itself and then regrow an entirely new body, complete with a beating heart and other vital organs.

The process, from shedding all of itself below the neck to regrowing a new body, took less than a month, in an extreme example of a process known as autotomy.

Sayaka Mitoh, of Nara Women’s University, said: “We were surprised to see the head moving just after autotomy.”

Reported in the journal Cell Biology, Mitoh and colleague Yoichi Yusa wrote how in their studies of the life history of the sea slugs, they spotted something odd.

Three of the younger lab-raised sea slugs, and one wild specimen being reared, “autotomized at their neck position” leaving behind a body with its heart, kidney, intestine and most of the reproductive organs.

While the bodies didn’t survive very long (from days to months before decomposing), the decapitated heads started feeding on algae within hours, and healed the “wound” within a day.

The disembodied head of the sacoglossan sea slug feasts on #algae while its old body decomposes, and a new one grows. #seaslug #sacoglossan

Mitoh and Yusa noticed a groove on the neck of the sea slugs. They tied some nylon around it to stimulate the mollusc’s trick, and some of those specimens dutifully performed.

The scientists think the sea slugs may have developed the technique as a way of getting rid of a parasite in their body.

Another key part of the trick is finding a way to get energy when you don’t have a digestive system.

The scientists think the sea slugs are using the energy from the photosynthesis occurring in cells that they’ve gained from algae they’ve eaten.

“I call them solar-powered slugs,” said Prof. Maria Byrne of the University of Sydney who was not involved in the research.

Byrne is a marine biologist who has studied autotomy in starfish, also known as sea stars.

She said some sea star species are able to regrow a new central nervous system, regenerate a new body from a severed arm, or even split themselves in half to colonize a habitat.

Sea slugs being able to regrow a full body was “kind of remarkable,” she said, and the ability was likely linked to the presence of stem cells.

“Stem cells are in all invertebrate animals. It’s a common mechanism, but it’s lost in higher animals,” she said.

Other animals that can regenerate body parts include salamanders that can regrow their full tails, axolotls (colloquially known as Mexican walking fish) that can regrow limbs and some fish that can regrow vital organs.

Keep reading