it was not so much natural selection for greater activity that drove this respiratory system improvement but the critically low, late Permian oxygen levels. Even with ectothermy, the latest Permian therapsids may have been like human mountain climbers.
One of the most enduring scientific debates of the past two decades has been about the metabolism of dinosaurs. Were they endotherms, ectotherms, or so massive that neither applied? The arguments have gone back and forth, based on evidence as disparate as bone structure, oxygen isotopes from dinosaur fossils, and reputed predator-prey ratios. Here it is proposed that endothermy originated as an adaptation to low atmospheric oxygen. If that was the case, endothermy should have evolved in multiple lineages near the end of the Permian. We have seen that such evidence exists for the late Permian therapsids, the lineage leading to mammals. But what of the other groups of Permian reptiles, the diapsids and anapsids? There is no evidence one way or another about anapsids, but this is not the case for the other large reptilian group, the diapsids (or archosaurs)—ancestors of crocodiles, dinosaurs, and many other lineages. Until recently most arguments about this lineage have rested on evidence from the modern crocodile group. It is generally agreed that crocodiles are archosaurs belonging to a lineage dating back to the late Permian. According to most phylogenies, this Permian group was also ancestral to the dinosaur-avian lineage and that the fundamental split into separate crocodile and dinosauravian lineages took place in the middle to late Triassic. Therefore, late Permian and early Triassic archosaurs were ancestors to both later lineages. So when might endothermy have evolved, if it did at all?
The large number of extant crocodiles are all ectotherms, and because of this it has been theorized that if endothermy evolved anywhere in the archosaur lineages other than in birds it did so only in the dinosaurs. According to this phylogeny, then, endothermy evolved after the crocodile-like lineage split off from the dinosaur-bird lineage. This former group, known as the crurotarsans, evolved into a number of very successful and common taxa of the middle to late Triassic, including the crocodile-like phytosaurs, the wholly terrestrial aetosaurs,