Ask the average person (or high schooler) on the street, and he’ll guess that the first mammals didn't appear on the scene until after the dinosaurs went extinct 65 million years ago--and that the last dinosaurs evolved into the first mammals. The truth, though, is very different: in fact, the first mammals evolved from therapsids ("mammal-like reptiles") at the end of the Triassic period, and coexisted with dinosaurs throughout the Mesozoic Era. But part of this folk tale has a grain of truth: it was only after the dinosaurs went kaput that mammals were able to evolve beyond their tiny, mouselike forms into the widely specialized species that populate the world today. (See a gallery of Mesozoic mammal pictures.)
These popular misconceptions about the mammals of the Mesozoic Era are easy to explain: scientifically speaking, dinosaurs tended to be very, very big and early mammals tended to be very, very small. With a couple of exceptions, the first mammals were tiny, inoffensive creatures, rarely more than a few inches long and a few ounces in weight. Thanks to their low profiles, these hard-to-see critters could feed on insects and small reptiles (which bigger raptors and tyrannosaurs tended to ignore), and they could also scurry up trees to avoid getting stomped on by larger ornithopods and sauropods.
The Evolution of the First Mammals
Before discussing how mammals evolved, it's helpful to define what distinguishes mammals from other animals (and especially reptiles). Female mammals have milk-producing mammary glands with which they suckle their young; most mammals have hair or fur, and all have warm-blooded (endothermic) metabolisms. In terms of the fossil record, paleontologists can distinguish mammals from reptiles by the shape of their head and neck bones, as well as the presence (in mammals) of two small bones in the inner ear (in reptiles, these bones constitute part of the jaw).
As mentioned above, the first mammals evolved toward the end of the Triassic period from therapsids, the line of "mammal-like reptiles" that arose in the early Permian period and produced such uncannily mammal-like beasts as Thrinaxodon and Cynognathus. By the time they went extinct in the mid-Jurassic period, some therapsids had evolved various proto-mammalian traits (fur, cold noses, warm-blooded metabolisms, and possibly live birthing) that were further elaborated upon by their descendants, the true mammals.
As you can guess, paleontologists have had a hard time distinguishing between the last, highly evolved therapsids and the first, newly evolved mammals. Late Triassic creatures like Eozostrodon, Megazostrodon and Sinoconodon appear to have been intermediate forms between therapsids and mammals, and even in the early Jurassic period, Oligokyphus sported reptilian ear and jaw bones at the same time as it showed every other sign (rat-like teeth, the habit of suckling its young) of being a mammal. (If this seems confusing, bear in mind that the modern-day platypus is classified as a mammal, even though it lays reptilian, soft-shelled eggs rather than giving birth to live young.)
Lifestyles of the First Mammals
The most distinctive thing about the mammals of the Mesozoic Era is how small they were. Although their therapsid ancestors attained respectable sizes (for example, the late Permian Biarmosuchus was about the size of a large dog), very few early mammals were larger than mice, for a simple reason: dinosaurs had already become the dominant land animals on earth. The only ecological niche open to the first mammals entailed a) feeding on plants, insects and small lizards, b) hunting at night (when predatory dinosaurs were less active), and c) living high up in trees. Eomaia, from the early Cretaceous period, and Cimolestes, from the late Cretaceous period, were fairly typical in this regard.
This isn't to say that all early mammals pursued identical lifestyles. For example, the North American Fruitafossor possessed a pointed snout and mole-like claws, which it clearly used to dig for insects (and probably to hide underground when predators were afoot), and the late Jurassic Castorocauda was built for an aquatic lifestyle, with a long, beaverlike tail and hydrodynamic arms and legs. Perhaps the most spectacular deviation from the Mesozoic mammalian body plan was Repenomamus, a three-foot-long, 25-pound carnivore that is know to have fed on dinosaurs (a fossilized specimen of Repenomamus has been found with the remains of a Psittacosaurus in its stomach).
Recently, paleontologists discovered conclusive evidence for the first important split in the mammal family tree, the one between placental and marsupial mammals. (Technically, the first, marsupial-like mammals of the late Triassic period are known as metatherians; from these evolved the eutherians, which later branched off into placental mammals.) The fossils of Juramaia, the "Jurassic mother," date to about 160 million years ago, and demonstrate that the metatherian/eutherian split occurred at least 35 million years before previous estimates!
The Age of Mammals
Ironically, the same characteristics that helped mammals maintain a low profile during the Mesozoic Era also allowed them to survive the K/T Extinction Event that doomed the dinosaurs. As the theory goes, that giant meteor impact 65 million years ago produced a kind of "nuclear winter," destroying most of the vegetation that sustained the herbivorous dinosaurs, which themselves sustained the carnivorous dinosaurs that preyed on them. Because of their tiny size, early mammals could survive on much less food, and their fur coats (and warm-blooded metabolisms) helped keep them warm in the plunging global temperatures.
With the dinosaurs out of the way, the succeeding Cenozoic Era was an object lesson in convergent evolution: the surviving mammals were free to radiate into open ecological niches, in many cases taking on the general "shape" of their dinosaur predecessors (giraffes, as you may have noticed, are eerily similar in body plan to ancient sauropods like Brachiosaurus, and other mammalian megafauna pursued similar evolutionary paths). Most important, from our perspective, early primates like Purgatorius were free to multiply, populating the branch of the evolutionary tree that led eventually to modern humans.
Here's a list of the most notable early mammals of the Mesozoic Era; just click on the links for more information.
Adelobasileus This mammal wasn't far removed from its therapsid ancestors.
Alphadon An early marsupial of the late Cretaceous.
Castorocauda This early mammal is known as the "Jurassic beaver."
Cimexomys Did this tiny mammal feast on Troodon eggs?
Cimolestes The tiny ancestor of all modern-day carnivores.
Cronopio Better known as the saber-toothed squirrel.
Crusafontia This early mammal had some squirrel-like characteristics.
Didelphodon A Cretaceous ancestor of the modern opossum.
Docodon Perhaps not a true mammal, but a "mammal-like reptile."
Eomaia This early mammal is known from a single, spectacular fossil.
Eozostrodon This Triassic critter may (or may not) have been the first true mammal.
Fruitafossor The earliest digging mammal yet discovered.
Hadrocodium This tiny mammal had an unusually large brain.
Juramaia The earliest known placental mammal in the fossil record.
Maotherium This early mammal was named after Mao Zhedong.
Megazostrodon A transitional form between therapsids and true mammals.
Morganucodon Another early mammal of the late Triassic period.
Oligokyphus An extremely mammal-like reptile of the early Jurassic.
Purgatorius Could this have been the direct ancestor of human beings?
Repenomamus The only early mammal known to have hunted dinosaurs.
Sinoconodon Another intermediate form between reptiles and mammals.
Sinodelphys One of the earliest marsupials yet discovered.
Steropodon This platypus ancestor lived 15 million years after Teinolophos.
Teinolophos An early ancestor of the modern platypus.
Triconodon A common mammal of the late Jurassic.
Zalambdalestes This tiny mammal may be the ancestor of modern rodents.