The Permian-Triassic extinction occurred 250 million years ago, defining the boundary between the Paleozoic and Mesozoic eras. Current theories say that it was likely caused by several factors. At that time, the continents had just recently joined together to form Pangea, which greatly altered many climates around the world, as well as removing many habitats altogether (such as most shallow marine environments). Additionally, an enormous amount of volcanic activity was occurring at the time. This resulted in a large increase in the amount of carbon dioxide in the atmosphere, causing massive global warming. This abrupt climate change drove many species to extinction--almost 90% of marine species and 70% of terrestrial species. The resulting survivors were the ancestors of the dinosaurs; their ability to expand uninhibited by other species allowed dinosaurs to dominate the Earth until they were themselves wiped out in the Cretaceous-Tertiary extinction.