|Fossil specimen of Odontochelys semitestacea|
Pantestudines is the group of all tetrapods more closely related to turtles than to any other animals. It includes both modern turtles (Testudines) and all of their extinct relatives (also known as stem-turtles).
The identity of the ancestors and closest relatives of the turtle lineage was a longstanding scientific mystery, though new discoveries and better analyses in the early 21st century began to clarify turtle relationships. Analysis of fossil data has shown that turtles are diapsid reptiles, most closely related either to the archosaurs (crocodiles, bird, and relatives) or the lepidosaurs (lizards, tuatara, and relatives). Genetic analysis strongly favors the hypothesis that turtles are the closest relatives of the archosaurs, though studies using only fossil evidence often continue to recover them as relatives of lepidosaurs. Studies using only fossils, as well as studies using a combination of fossil and genetic evidence, both suggest that sauropterygians, the group of prehistoric marine reptiles including the plesiosaurs and the often superficially turtle-like placodonts, are themselves stem-turtles.
The cladogram shown below follows the most likely result found by an analysis of turtle relationships using both fossil and genetic evidence by M.S. Lee, in 2013. This study found Eunotosaurus, usually regarded as a turtle relative, to be only very distantly related to turtles in the clade Parareptilia.
The cladogram below follows the most likely result found by another analysis of turtle relationships, this one using only fossil evidence, published by Rainer Schoch and Hans-Dieter Sues in 2015. This study found Eunotosaurus to be an actual early stem-turtle, though other versions of the analysis found weak support for it as a parareptile.
Time-calibrated phylogeny recovered by Shaffer et al. (2017) dated the split of Pantestudines from its sister clade (the clade containing archosaurs and all tetrapods more closely related to archosaurs than to any other living animals) to mid-Carboniferous.
The cladogram below follows the analysis of Li et al. (2018). It agrees with the placement of turtles within Diapsida but finds them outside of Sauria (the Lepidosauromorpha + Archosauromorpha clade).
Laurin and Piñeiro (2017) placed turtles close to pareiasaurs within Parareptilia, a clade they considered sister to Neodiapsida.