The archosaurs or their immediate ancestors survived the catastrophic Permian–Triassic extinction event. Then, in the early and middle Triassic, there was rapid evolution into the types of aquatic and land tetrapods which dominated the rest of the Mesozoic era.