When fish first tried to walk on land 400 million years ago, their anatomy and behaviour changed dramatically, scientists have said.

Published in the journal Nature, researchers at McGill University in Montreal were looking to find out how ancient fish managed to leave their watery homes for dry land.

While researchers have long known fish evolved into tetrapods – which include today's amphibians, reptiles, birds and mammals – the process for how they did this remains a mystery.

To find answers, researchers looked at a living fish today. Polypeterus is an African fish that can breathe air, walk on land and look very similar to the first fishes that evolved into tetrapods.

The scientists raised a juvenile Polypterus on land for a year to see how their looks and behaviour changed.

Findings showed the fish went through significant changes. It walked more effectively by placing its fins closer to its body, it raised its head higher and kept their fins from slipping compared to those raised in water.

Study collaborator Trina Du said: "Anatomically, their pectoral skeleton changed to became more elongate with stronger attachments across their chest, possibly to increase support during walking, and a reduced contact with the skull to potentially allow greater head/neck motion."

Hans Larsson, Canada Research Chair in Macroevolution at McGill, added: "Because many of the anatomical changes mirror the fossil record, we can hypothesise that the behavioural changes we see also reflect what may have occurred when fossil fish first walked with their fins on land.

"This is the first example we know of that demonstrates developmental plasticity may have facilitated a large-scale evolutionary transition, by first accessing new anatomies and behaviours that could later be genetically fixed by natural selection."