Researchers have uncovered a strange, otherworldly creature that once lived half a billion years ago. This nightmarish, work-like animal had legs, spikes and a head difficult to distinguish from its tail.

An artist’s impression of the weird creature called Hallucigenia, distantly related to modern insects and crustaceans, has been created for the first time after scientists worked out what it actually looked like.

Scientists were initially baffled when its remains were found in the 1970s and it took ages to figure out what parts were its legs or its spines and its top or bottom.

But after loads of research as part of a new study of Hallucigenia fossils from the Royal Ontario Museum, Canada, and Smithsonian Institution in the US they have finally been able to put a face to its name, including its simple eyes and needle-like teeth.

Hallucigenia has bared its teeth to scientists.

Hallucigenia had a worm-like body, seven pairs of legs ending in claws, and a back sprouting long spines.

Dr Jean-Bernard Caron, from the Royal Ontario Museum, explained how the team removed sediment covering one end of the creatures, which died in mud 508 million years ago.

He said: “This let us get the new images of the head. When we put the fossils in the electron microscope we were initially hoping that we might find eyes, and were astonished when we also found the teeth smiling back at us.”

The images show an elongated head with a pair of simple eyes sitting above a mouth encasing a ring of teeth, which also lined the animal’s throat.

The teeth probably flexed in and out to generate suction, helping Hallucigenia to draw in food, said the scientists writing in the journal Nature.

Lead author Dr Martin Smith, from Cambridge University, said: “Prior to our study there was still some uncertainty as to which end of the animal represented the head, and which the tail.

“A large balloon-like orb at one end of the specimen was originally thought to be the head, but we can now demonstrate that this actually wasn’t part of the body at all, but a dark stain representing decay fluids or gut contents that oozed out as the animal was flattened during burial.”

But don’t have nightmares, it only grew up to about five centimetres long!

Agencies/Canadajournal