Lactation represents an important element of the life history strategies of all mammals, whether monotreme, marsupial, or eutherian. Milk originated as a glandular skin secretion in synapsids (the lineage ancestral to mammals), perhaps as early as the Pennsylvanian period, that is, approximately 310 million years ago (mya). Early synapsids laid eggs with parchment-like shells intolerant of desiccation and apparently dependent on glandular skin secretions for moisture. Mammary glands probably evolved from apocrine-like glands that combined multiple modes of secretion and developed in association with hair follicles. Comparative analyses of the evolutionary origin of milk constituents support a scenario in which these secretions evolved into a nutrient-rich milk long before mammals arose. A variety of antimicrobial and secretory constituents were co-opted into novel roles related to nutrition of the young. Secretory calcium-binding phosphoproteins may originally have had a role in calcium delivery to eggs; however, by evolving into large, complex casein micelles, they took on an important role in transport of amino acids, calcium and phosphorus. Several proteins involved in immunity, including an ancestral butyrophilin and xanthine oxidoreductase, were incorporated into a novel membrane-bound lipid droplet (the milk fat globule) that became a primary mode of energy transfer. An ancestral c-lysozyme lost its lytic functions in favor of a role as α-lactalbumin, which modifies a galactosyltransferase to recognize glucose as an acceptor, leading to the synthesis of novel milk sugars, of which free oligosaccharides may have predated free lactose. An ancestral lipocalin and an ancestral whey acidic protein four-disulphide core protein apparently lost their original transport and antimicrobial functions when they became the whey proteins β-lactoglobulin and whey acidic protein, which with α-lactalbumin provide limiting sulfur amino acids to the young. By the late Triassic period (ca 210 mya), mammaliaforms (mammalian ancestors) were endothermic (requiring fluid to replace incubatory water losses of eggs), very small in size (making large eggs impossible), and had rapid growth and limited tooth replacement (indicating delayed onset of feeding and reliance on milk). Thus, milk had already supplanted egg yolk as the primary nutrient source, and by the Jurassic period (ca 170 mya) vitellogenin genes were being lost. All primary milk constituents evolved before the appearance of mammals, and some constituents may have origins that predate the split of the synapsids from sauropsids (the lineage leading to ‘reptiles’ and birds). Thus, the modern dairy industry is built upon a very old foundation, the cornerstones of which were laid even before dinosaurs ruled the earth in the Jurassic and Cretaceous periods.