This is according to a study that shows for the first time how these reptiles evolved in a dinosaur dominated world.
Today, most modern crocodiles live in freshwater habitats and feed on mammals and fish.
But their ancestors were very different creatures, with some running around on land like dogs while others adapted to life in the open ocean, imitating the behaviour of whales.
The study, by Bristol University, reveals how the jaws of the ancient crocodiles evolved to enable these fierce animals to survive in vastly different environments
Tom Stubbs, who led the research, said: ‘The ancestors of today’s crocodiles have a fascinating history that is relatively unknown compared to their dinosaur counterparts.
‘They were very different creatures to the ones we are familiar with today, much more diverse and, as this research shows, their ability to adapt was quite remarkable.
‘Their evolution and anatomical variation during the Mesozoic Era was exceptional.
‘They evolved lifestyles and feeding ecologies unlike anything seen today.”
The team examined variation in the shape and biomechanics function of the lower jaws in over 100 ancient crocodiles during the Mesozoic – a period which began 251 million years ago and covered over 170 million years.
The study revealed that ancient crocodiles invaded the Jurassic seas and evolved jaws built primarily for water efficiency to capture agile prey, such as fish.
The research also found that variation peaked again in the Cretaceous period- 142 million years ago – where ancient crocodiles evolved a great variety of lower jaw shapes as they adapted to a diverse range of food.
After the devastating end-Triassic extinction event, crocodile ancestors invaded the seas and evolved jaws primarily built to efficiently swim in the water to catch agile prey such as fish.
They also evolved a great variety of lower jaw shapes during the Cretaceous Period – about 145 million to 65 million years ago – as they adapted to a diverse range of niches and environments alongside the dinosaurs, including eating plants.
Surprisingly, the lower jaws of Cretaceous crocodiles did not have a huge amount of variation.
Instead, the fossil record points towards novel adaptations in other areas of their anatomy, such as armadillo-like body armour.
Dr Stephanie Pierce, from the Royal Veterinary College said: ‘Our results show that the ability to exploit a variety of different food resources and habitats, by evolving many different jaw shapes, was crucial to recovering from the end-Triassic extinction and most likely contributed to the success of Mesozoic crocodiles living in the shadow of the dinosaurs.’