Scientists have revealed a spectacular insight into turtle evolution - how the unique animals get their shells.
A Japanese team studied the development of turtle embryos to find out why their ribs grow outward and fuse together to form a tough, external carapace.
Reporting in the journal Science, the researchers compared turtle embryos with those of chicks and mice.
They found that, as turtles developed, part of their body wall folded in on itself forcing the ribs outward.
The team of researchers from the Riken Center for Developmental Biology in Kobe, Japan, described the turtle shell as an "evolutionary novelty".
It represents such a leap from the soft-bodied ancestors that turtles share with mammals and birds, that scientists have long puzzled over how exactly it came about.
"Other groups have looked into why the shoulder blade in turtles is encased inside the rib cage," said Olivier Rieppel from Field Museum in Chicago, an expert in reptile evolution who was not involved in this study.
"That makes them unique."
This study identified the key event in the development of a turtle embryo that changes its fundamental "body plan" - when the upper part of the its body wall folds in on itself.
This fold produces what scientists refer to as the carapacial disc - a thickening of the deep layer of the turtle's skin that maps out the position of its shell.
"Once you have this body plan, you have the carapacial disc and all the rest of it follows," said Dr Rieppel.
In the early embryo, the muscles and skeleton are in similar positions to those of the chicken and mouse, explained Shigeru Kuratani, one of the authors of the study.
As the embryo develops, this folding essentially "re-maps" the turtle's body - mechanically preventing the ribs from growing inward and holding the shoulder blades in place.
Dr Kuratani explained that some of the connections between developing bones and muscles were the same as in birds and mammals, but there were some, including the pectoral muscles, that "showed entirely unique (types of) connectivity in turtles".
The discovery helps define a position in evolutionary history for a 220-million-year-old turtle fossil discovered last year in China, which had an incomplete shell that only covered its underside.
"The developmental stage of the modern turtle, when the ribs have not encapsulated the shoulder blade yet, resembles the (body) of this fossil species," said Dr Kuratani.
Dr Rieppel, who examined the Chinese fossil when it was discovered late in 2008, said this study illustrated that the ancient turtle was "basically an intermediate step in the animals' evolution".
The scientists do not yet know what causes the folding. "That belongs to a future project," said Dr Kuratani.
Stressing the importance of developmental research to evolutionary biology, Dr Kuratani said: "Developmental changes in evolution give rise to an enormous diversity of animal forms."
"No matter how exquisite it may seem, as if it were some sort of magic, evolution is at most a good trick... and there is a way to make it work.
"In case of turtle evolution, a major part of the trick was found to be (this) embryonic folding."