Final answer:
The mass extinction at the end of the Mesozoic era allowed mammals to evolve and fill ecological niches left by the extinct species, resulting in their dominance in the Cenozoic era.
Step-by-step explanation:
The mass extinction at the end of the Mesozoic era, known as the Cretaceous-Tertiary extinction, allowed mammals to evolve and fill ecological niches left by the extinct species. This is because the extinction event wiped out many of the large-bodied animals of the Mesozoic era, including dinosaurs, creating empty niches for mammals to exploit. The dominance of mammals in the Cenozoic era can be attributed to this opportunity for diversification and expansion into new habitats.