Crocodiles which roamed the world's seas millions of years ago developed in similar ways to their modern-day relatives, a study has shown.

Fresh research into a group of prehistoric marine crocs known as Machimosaurus reveals key details of how and where they lived.

Each species adapted features that enabled them to live and hunt in a range of habitats, just like modern-day crocodiles. They varied in body length, body skeleton, skull and lower jaw shape, and in their teeth.

The ancient croc group included a nine-metre long saltwater species, which was adapted for living in open seas, and fed on marine turtles. Its closest relatives, by contrast, lived in coastal, choppy environments.

The prehistoric crocs' development mirrors those of today's crocodiles, whose saltwater varieties are far bigger and suited to larger territories compared with their smaller cousins that live closer to shore or in freshwater.

A team of researchers, led by the University of Edinburgh, examined fossil specimens from museums around Europe. From detailed analysis, they were able to determine key elements of the animals' anatomy and lifestyle, and concluded that not all were of the same species.

Until now, scientists were unsure whether more than one species of Machimosaurus existed. However, their findings show that there were at least three distinct species -- one of which has been fully identified for the first time. The study is published in the journal Royal Society Open Science.

Dr Mark Young, of the University of Edinburgh's School of GeoSciences, who led the study, said: "Interesting parallels can be seen between groups of ancient crocodiles and those living today, with some able to swim out in the open sea, with others restricted to the coast. With more fossils being discovered, we look forward to learning more about this giant group of Jurassic predators."