This is a reconstruction of the Burgess Shale animal Hallucigenia sparsa. (Elyssa Rider)

What has 20 legs, 14 sharp spikes on its back and a head that's really hard to distinguish from its rear end? Scientists didn't know either -- until recently.

It's called Hallucigenia because researchers have scratched their heads over where it fits among life forms since its fossil was discovered in the Burgess Shale of Canada's Rocky Mountains in the early 1970s. Unable to determine any living thing that evolved from it, they called it an "evolutionary misfit" for decades.

But a closer look into microscopes by scientists at the University of Cambridge finally yielded some clues that. A new study of the claws at the end of all those legs "revealed an organization very close to those of modern velvet worms," it says.

Like technicians who manicure fingernails and toenails, the researchers zeroed in on the animal's cuticles, which were stacked one inside the other, like those wooden Russian nesting dolls that open up only to reveal another doll. It was an oddity observed in at least one other place, the weird jaws of velvet worms, which, in the university's synopsis of the report, "are no more than legs modified for chewing."

That's right, legs that eat.

That stranger-than-science fiction reality finally solved a nearly 40-year-old puzzle. Hallucigenia, aptly named because people might have thought a person describing it was hallucinating, lived about 500 million years ago during the Cambrian Explosion, a period when most major animal groups first started to appear in the fossil record.

"It's often thought that modern animal groups arose fully formed during the Cambrian Explosion," Martin Smith, a professor at the university's Department of Earth Sciences and the study's lead author, said in a statement. "But evolution is a gradual process: today's complex anatomies emerged step by step, one feature at a time."

Smith and his co-authors painstakingly tracked strange fossils that appeared to evolve from the original. By "deciphering 'in-between' fossils like Hallucigenia," he said, they were able to determine how different animal groups built the bodies they inhabit today.

Here's what they looked like and where they lived, according to the study: "Hallucigenia had a row of rigid spines along its back, and seven or eight pairs of legs ending in claws. The animals were between five and 35 millimeters in length, and lived on the floor of the Cambrian oceans."

Because velvet worms are so weird, Hallucigenia was suspected to be an ancestor. But characteristics linking the two were not easy to find in the fossil record, and the details of the claws -- cuticles and such -- had not been closely reviewed.

Squinting hard and analyzing both the prehistoric and living animals, the claws were identified as a smoking gun joining the two.

The finding is a big deal, said Javier Ortega-Hernandez, a co-author of the study, because it turns what is known about the evolutionary tree of arthropods -- spiders, crustaceans and insects -- on its head.

"Most gene-based studies suggest that arthropods and velvet worms are closely related," Ortega-Hernandez said. But "our results indicate that arthropods are actually closer to water bears," he said.

He's not talking about an actual bear. Ortega-Hernandez was referring to a microscopic tardigrade, a little beast whose image can make a viewer's skin crawl, a thing with a round mouth full of teeth for attaching and sucking, with claws at the end of stubby legs.

Ortega-Hernandez spoke of tardigrades more fondly, calling them "a group of hardy microscopic animals best known for being able to survive the vacuum of space and sub-zero temperatures – leaving velvet worms as distant cousins."