A study of fossilised teeth has shed new light on how reptiles adapted to changing seas more than 150 million years ago.
Edinburgh University palaeontologists found marine predators living in deep waters during the Jurassic Period thrived as sea levels rose.
However, species that dwelled in the shallows died out.
It shows how the structure of food chains in the sea have remained largely unchanged since the Jurassic era.
The team analysed the shape and size of teeth spanning an 18 million-year period during which diverse reptiles lived in tropical waters stretching from present-day northern France to Yorkshire in the north of England.
They found as global sea levels rose, species that lived in shallow waters and caught fish using thin, piercing teeth declined drastically.
Meanwhile, larger species in deeper, open waters with broader teeth for crunching and cutting prey began to thrive.
These species may have benefited from major changes in ocean temperature and chemical make-up which could have increased levels of nutrients and prey in deep waters, the researchers said.
The study, which also involved the University of Bristol, could shed light on how species at the top of marine food chains today might respond to rapid environmental changes such as climate change, pollution and rising temperatures.
Davide Foffa, of Edinburgh University's school of geosciences - who led the study, said: "Studying the evolution of these animals was a real - and rare - treat, and has offered a simple yet powerful explanation for why some species declined as others prospered.
"This work reminds us of the relevance of palaeontology by revealing the parallels between past and present-day ocean ecosystems."
Dr Steve Brusatte, of Edinburgh University, added: "Teeth are humble fossils, but they reveal a grand story of how sea reptiles evolved over millions of years as their environments changed.
"Changes in these Jurassic reptiles parallel changes in dolphins and other marine species that are occurring today as sea-levels rise, which speaks to how important fossils are for understanding our modern world."
The study, published in the journal PLOS Genetics, was funded by Wellcome.