Therapsids, the early ancestors of mammals, appeared about 250 million years ago during the Triassic Period of the Mesozoic Era. They were reptiles similar to mammals, agile predators with small bodies.
As shown by the fossils of one of the early mammals, Megazostrodon, they looked like shrews with bodies about 10 ㎝ in length. These early mammals, called therapsids, had small bodies and flexible frames, and hunted for prey while hiding in bushes and forests.
Following the first appearance of mammals, dinosaurs, from gigantic herbivorous ones to tyrannical carnivorous ones, dominated the world for almost 135 million years, from the Jurassic Period to the Cretaceous Period.
It is thought that early mammals usually moved at night for better survival, staying hidden during daylight hours to escape the attention of the dinosaurs that dominated the land until the Jurassic Period. During that period, mammals were nocturnal vertebrate animals that had small bodies and mostly ate insects. Due to their restricted sphere of activity, their bodies could not evolve into bigger forms.
About 65 million years ago, while most of the dinosaurs went extinct, the evolution of mammals continued in the third period of the Cenozoic Era. Although during the Mesozoic Era no special changes or appearances of species occurred, in the Cenozoic Era when the dinosaurs died out, various mammals emerged and evolved rapidly. Then, from 40 million years ago when the first whales appeared in the sea, all the current mammal groups appeared on the Earth, and they came to live almost everywhere in the world, through several changes in their morphology, habits, and distribution over several ice ages.