Image copyright Mark Witton/National Museums Scotland Image caption Artist's impression of how the animals might have looked

Fossils of what may be the earliest four-legged backboned animals to walk on land have been discovered in Scotland.

The lizard-like creatures lived about 355 million years ago, when the ancestors of modern reptiles, birds and mammals emerged from swamps.

The discovery plugs a 15 million-year gap in the fossil record.

There are five complete fossils and many more fragments of bones that have yet to be classified.

Some resemble lizards or newts, while others are larger, with almost crocodile-like proportions.

"We're lifting the lid on a key part of the evolutionary story of life on land," said Prof Jennifer Clack of the University of Cambridge.

"What happened then affects everything that happens subsequently - so it affects the fact that we are here and which other animals live with us today."

Critical step

The fossils suggest that the first backboned animals to crawl around on land may have lived in what is now the Scottish borders.

Alternatively, there may be many more similar fossils in other parts of the world that have yet to be discovered.

Dr Nick Fraser, of National Museums Scotland, who worked on the fossils, said they represent a "critical step in the evolution of life on Earth".

"Without this step of vertebrates - animals with backbones - coming on to land, we wouldn't be here, birds wouldn't be here, crocodiles wouldn't be here, lizards, frogs, dinosaurs would never have roamed the Earth - all these things would not have evolved," he told BBC News.

Image copyright R Clack Image caption Fossils have also been found in Burnmouth on the east coast of Scotland

Around 360 million years ago, many life forms, including early fish, were wiped out in a mass extinction.

For the next 15 million years or so, a key time in tetrapod evolution, there is a gap in the fossil record.

This means we know very little about how fish-like animals grew the limbs that could support them on land.

Dr Fraser said the focus of attention is on Scotland, as it may be the place where these animals "first colonised land".

"These are the oldest animals with four legs that were able to move around on land," he said.

"If you want to draw the analogy to Neil Armstrong's first step on the Moon - it was one small step for man but a giant leap for mankind, well, this in some ways is a small step out of the water for these animals but it's a giant leap forward for the future evolution of life on land."

Image copyright NMS Image caption The fossils were found in a river near Chirnside in Berwickshire, Scotland

Only a handful of sites in the world have yielded similar fossils from this time period.

One is in Scotland - in Dumbarton, west of Glasgow, where only a single fossil (Pederpes) has been unearthed.

Fragments of fossils have been found in the US and Canada.

Details of the latest discoveries are published in the journal Nature Ecology & Evolution.

Dr Per Ahlberg, of Uppsala University, Sweden, said the fossils "substantially change our picture of early tetrapod evolution".

And Dr Mike Coates, of the University of Chicago, said "they predict more diversity, earlier in the fossil record" and suggest "a greater range of extinction survivors among the early tetrapods".

Dr Jason Anderson, of the University of Calgary, said the fossils show that the apparent gap in the fossil record "is due to a lack of fossil collection, and not because there were no fossils because of low atmospheric oxygen".

Follow Helen on Twitter.