Image copyright Sean McMahon at Yale University Image caption Reconstruction of what the Tully Monster might have have looked like 300 million years ago

Scientists say a worm-like fossil with mysterious origins is actually the ancestor of living fish.

The 300 million-year-old animal was found at an Illinois mine in 1958 by fossil collector Francis Tully.

The "Tully monster" has been a puzzle to scientists ever since, and has been likened to worms and molluscs.

US researchers say the fossil is a backboned animal rather than an invertebrate as once thought, based on an analysis of 1,000 museum specimens.

Their findings, published in Nature, place it firmly on the tree of life of vertebrates and related to fish such as lamprey and hagfish.

It has a rudimentary backbone, which has been misinterpreted in the past as a trace of gut, said Victoria McCoy of Yale University.

"The Tully Monster is very weird looking but we found it is related to modern lamprey," she told BBC News.

"It shows us how evolution can take something very familiar and make it very weird without changing what we know about the tree of life."

What are lampreys?

Lampreys are the world's oldest living vertebrates, dating back to before the reign of the dinosaurs.

They are a very ancient and primitive group of jawless vertebrates, which appear to have changed little over time.

Most species of lamprey are parasites and have long, eel-like bodies.

They use their jawless mouths to stick to a host fish by suction before sucking out the living tissues.

Ancient landscape

Remains of the Tully monster (Tullimonstrum gregarium) have been found only in the Mazon Creek fossil beds of Illinois.

It once swam in the warm coastal waters of a 300 million year old ocean, alongside jellyfish, worms, and sea cucumbers.

The animal was soft-bodied making it particularly difficult to classify from traces of the tissues that remain.

Image copyright Paul Mayer at the Field Museum of Natural History Image caption A specimen showing the animal's eye bar, tail fin, and the proboscis and jaw folded back over the body.

Past interpretations of the fossil have likened it to a worm, a mollusc, an arthropod or a conodont (the group of extinct microfossils believed to be distantly related to living fish).

Dr McCoy and colleagues analysed more than 1,200 museum specimens in order to find out where the animal belongs on the evolutionary tree.

They say it was about 10 cm long, with a slender, segmented body, eyes projecting at each end of a long rigid bar, a tail fin, and jaws containing rows of teeth at the end of a proboscis.

The research was carried out by teams at Yale University, the American Museum of Natural History in New York, Field Museum of Natural History in Chicago and Yale Peabody Museum of Natural History.

Follow Helen on Twitter.