By the end of the Paleozoic, life diversified to its maximum size to date. And then the largest of the 5 recent mass extinctions takes place. The day the earth nearly died at the end of the Permian period was not just one bad day, but many. But the opening of niches after the extinction led to two of the most famous animal lines: dinosaurs (including birds) and mammals.