The unearthing of three 220m-year-old fossils in China has solved the enduring mystery of how the turtle got its shell.

The ancient remains are the first evidence palaeontologists have of a species of turtle that is in the process of evolving a shell, revealing for the first time how it happened.

Fossil hunters uncovered the remains of three remarkably intact adults in Guizhou province last year. Each has characteristics that have never been seen in turtles before, including teeth and an incomplete upper shell, according to a report in the journal Nature.

Turtles have had complete shells since the time of the dinosaurs. Before the latest find, the oldest known turtle fossil was a specimen unearthed in Germany dated to 210m years ago. That creature, named Proganochelys, did not shed light on the evolution of shells because its was already fully formed.

Scientists have been divided on how the turtle shell evolved, with some arguing that it developed from bony plates on the skin that broadened to form a kind of armour before fusing to the underlying ribs and backbone. Modern reptiles such as crocodiles have bony plates, called osteoderms, a feature also seen in some dinosaurs, including the ankylosaurs.

Artist's impression of the ancestral turtle Odontochelys with its armoured belly and soft top. Image: Marlene Donnelly

The latest fossil, named Odontochelys semitestacea – meaning "toothed, half-shelled turtle" – proves that shells formed in two stages. First the underside of the shell, called the plastron, developed, then the ribs and backbone grew out to form the upper shell or carapace.

Odontochelys has a fully formed plastron but only a partial upper shell extending from its widened ribs and backbone.

"Now we have these fossils of the earliest known turtle. They support the theory that the shell would have formed from below as extensions of the backbone and ribs, rather than as bony plates from the skin as others have theorised," said Xiao-chun Wu at the Canadian Museum of Nature in Ottawa.

Dr Wu's student and lead author of the report, Chun Li of the Institute of Vertebrate Palaeontology at the Chinese Academy of Sciences in Beijing, discovered the fossils in Guizhou province with the help of local farmers.

Detailed inspection of the fossils suggests that Odontochelys was an aquatic animal. The lower shell is one clue, as it would have protected the turtle from predators below as it swam. The remains of other marine reptiles and invertebrates were found in the same rock formations.

"Reptiles living on the land have their bellies close to the ground with little exposure to danger," said Olivier Rieppel, head of geology at The Field Museum in Chicago. "This animal tells people to forget about turtle ancestors covered with osteoderms."