The reptiles appeared from labyrinthodonts in the subsequent Carboniferous period. The anapsid and synapsid reptiles were common during the late Paleozoic, while the diapsids became dominant during the Mesozoic. In the sea, the bony fishes became dominant. The dinosaurs gave rise to the birds in the Jurassic.The demise of the dinosaurs at the end of the Cretaceous promoted expansion of the mammals, which had evolved from the therapsids, a group of synapsid reptiles, during the late Triassic Period.