Temporal niche expansion in mammals from a nocturnal ancestor after dinosaur extinction

Published online:


Most modern mammals, including strictly diurnal species, exhibit sensory adaptations to nocturnal activity that are thought to be the result of a prolonged nocturnal phase or ‘bottleneck’ during early mammalian evolution. Nocturnality may have allowed mammals to avoid antagonistic interactions with diurnal dinosaurs during the Mesozoic. However, understanding the evolution of mammalian activity patterns is hindered by scant and ambiguous fossil evidence. While ancestral reconstructions of behavioural traits from extant species have the potential to elucidate these patterns, existing studies have been limited in taxonomic scope. Here, we use an extensive behavioural dataset for 2,415 species from all extant orders to reconstruct ancestral activity patterns across Mammalia. We find strong support for the nocturnal origin of mammals and the Cenozoic appearance of diurnality, although cathemerality (mixed diel periodicity) may have appeared in the late Cretaceous. Simian primates are among the earliest mammals to exhibit strict diurnal activity, some 52–33 million years ago. Our study is consistent with the hypothesis that temporal partitioning between early mammals and dinosaurs during the Mesozoic led to a mammalian nocturnal bottleneck, but also demonstrates the need for improved phylogenetic estimates for Mammalia.


Species exhibit characteristic patterns of activity distribution over the 24 h (diel) cycle and, as environmental conditions may change radically yet predictably between day and night, activity patterns allow individuals to anticipate fluctuations and time activity optimally1,2. Physiological and behavioural adaptations to different activity patterns are important contributors to individual fitness3 and therefore to species evolutionary success4,5. Moreover, long-term shifts in activity patterns may reveal shifts in selectiveregimes caused by changes in biotic and abiotic conditions5,6,7. Although mammals exhibit striking morphological, behavioural and ecological niche diversity8, the distribution of mammalian activity patterns is strongly biased towards nocturnality9.Additionally, most mammalian species, including strictly diurnal ones, exhibit visual adaptations to nocturnal activity that are similar to those of nocturnal birds and reptiles10. For example, mammals (except Haplorrhine primates) lack a fovea—an area in the retina that enables very high visual acuity found in fish, reptiles and birds that are diurnal visual predators11. Most mammalian eyes have high ratios of corneal diameter to axial ocular length, which favour sensitivity to low light over visual acuity and are comparable to those found in nocturnal reptiles and birds10. Compared with all other vertebrates, mammals also exhibit reduced diversity of active photoreceptors for colour perception in bright environments12,13. Many day-active mammals (for example, ungulates and carnivores) have rod-dominated retinae; that is, they have eyes better suited for low-light conditions (night vision), although retinal rod-to-cone ratios show high interspecific variability14. There is also evidence that enhanced olfactory sensitivity15, broader frequency range hearing16 and sophisticated whisker-mediated tactile perception17 may have evolved in mammals to compensate for insufficient visual information10,13.

In his seminal work, Walls11 noted the differences between mammals and other (mostly diurnal) amniotes in eye shape, retinal composition and visual pathways. He proposed that the predominance of nocturnal adaptations in mammals may be the result of a prolonged nocturnal phase in the early stages of mammalian evolution, after which emerged the more diverse patterns observed today11,13. This ‘nocturnal bottleneck’ hypothesis suggests that mammals were restricted to nocturnal activity by antagonistic interactions with the ecologically dominant diurnal dinosaurs during the Mesozoic11,13,18.The Cretaceous–Palaeogene (K–Pg) mass extinction event circa 66 million years ago (Ma) led to the extinction of all non-avian dinosaurs along with the marine and flying reptiles and the majority of other vertebrate, invertebrate and plant taxa19,20. This event marks the end of the Mesozoic ‘reign of dinosaurs’ and the transition to the mammal-dominated Cenozoic fauna. If an antagonistic interaction with dinosaurs was an important factor in restricting early mammals to nocturnal activity, the vast majority of Mesozoic mammals—if not all of them—are expected to have been nocturnal, and diurnal mammals would have only appeared after the K–Pg mass extinction event.

Support for the nocturnal bottleneck hypothesis is drawn from anatomical and morphological studies10,11 and, increasingly, from molecular studies12,13, but remains indirect. For example, some Synapsids—the non-mammalian lineage ancestral to mammals—were adapted to nocturnal activity > 300 Ma, suggesting that nocturnality—a relatively rare state in amniotes—may have already characterized the Palaeozoic precursors of mammals21. However, inferring activity patterns from fossil morphology may be unreliable22,23, particularly as all modern mammals (except Haplorrhine primates) have nocturnal-type ocular and cranial morphologies (for example, high corneal diameter to axial length ratios and a large binocular visual field overlap) regardless of their activity pattern10,23. Evidence from histological and molecular studies of the evolutionary development of mammalian eyes indicates that nocturnal adaptations preceded diurnal ones12,24, but this does not help elucidate questions around the timing of these adaptations.

Ancestral reconstructions of behavioural traits using a phylogenetic comparative approach may help us to understand both the pattern and timing of the evolution of activity patterns in mammals, since activity patterns have been shown to be genetically determined25 yet responsive to selective pressures2. However, phylogenetic studies of mammalian activity patterns so far have mostly focused on two mammalian orders—primates26,27,28 and rodents29. Primate activity patterns have been studied extensively and some evidence suggests that primate diurnality originated in the most recent common ancestor (MRCA) of the suborder Haplorrhini(all monkeys, apes and tarsiers)5 in the Mesozoic30,31. It is conceivable, although thus far not tested, that diurnal diversifications in other orders of Mesozoic origin, for example, Scandentia (tree shrews), Macroscelidea (elephant shrews) and Rodentia, could have occurred before the extinction of dinosaurs, calling for a wider examination of how activity patterns evolved across mammals.

Here, we use an extensive dataset of activity patterns for 2,415 mammal species, representing 135 of the 148 extant families and all extant orders (Supplementary Table 1) to investigate ancestral activity patterns in mammals and to understand the timings of the appearance of mammal diurnality. We assign species to one of five activity patterns: (1) nocturnal—active only or mostly in the dark; (2) diurnal—active only or mostly during daylight hours; (3) cathemeral—active both during the day and during the night; (4) crepuscular—active only at twilight, around sunrise and/or sunset; and (5) ultradian—active in cycles of a few hours (see Methods). We map the three main activity patterns (nocturnal, cathemeral and diurnal) onto two phylogenetic frameworks representing two of the main hypotheses of mammalian evolutionary history for our analyses, termed here short fuse (SF), following ref. 31 updated by ref. 32, and long fuse (LF) (adapted from ref. 30) phylogenies (Fig. 1). We then use reversible-jump Markov chain Monte Carlo (rjMCMC) methods33 to estimate transition rates between different activity states and to infer the posterior probability (PP) of character states at each node in the phylogenies. This allows us to examine the evolution of activity patterns of mammals and to test the main predictions of the nocturnal bottleneck hypothesis: (1) the MRCA to all extant mammals was nocturnal and (2) mammal diurnality first emerged in the Cenozoic.

Fig. 1: Activity pattern distributions across the SF and LF estimates of mammalian evolution.
Fig. 1

a, SF. b, LF. Species activity patterns are denoted by different colours in the perimeter circle, where nocturnal is blue, diurnal is yellow, cathemeral is green and ambiguous is magenta. The branch colours represent taxonomy, where marsupials are pink, Afrotheria are brown, Soricomorpha + Erinaceomorpha are green, Chiroptera are blue, Cetartiodactyla are yellow, Carnivora are grey, primates are purple, Rodentia are orange and all other orders are black. The Mesozoic and Cenozoic eras are denoted by blue and white backgrounds, respectively. SF phylogeny follows ref. 31 updated by ref. 32; LF phylogeny is adapted from ref. 30 (see Methods). Branch lengths are proportional to time.


We found that the modal values of PPNoct (PP of nocturnality) at the ancestral node of extant mammals were 0.74 (95% credible interval (CrI): 0.71–0.76) and 0.59 (CrI: 0.54–0.64) for SF and LF phylogenies, respectively, offering support for a noctural ancestor (Fig. 2). In contrast, a cathemeral or diurnal ancestral state was much less well supported: modal values of PPCath (PP of cathemerality) were 0.24 (CrI: 0.23–0.26) and 0.31 (CrI: 0.29–0.33) for SF and LF, respectively, and for PPDiur (PP of diurnality) they were 0.02 (CrI: 0.01–0.03) for SF and 0.1 (CrI: 0.07–0.14) for LF (Fig. 2). The narrow and non-overlapping distributions of PP values across the activity pattern reconstructions indicate that our results are consistent and robust across samples of the rjMCMC chains, although the distributions were wider using the LF phylogeny (Fig. 2).

Fig. 2: PP density of ancestral activity pattern reconstructions of the MRCA of crown-group Mammalia from SF and LF phylogenies.
Fig. 2

a, SF.b, LF. Distribution curves were calculated from 1,000 post-burnin rjMCMC samples. The modal PP values for each distribution are shown above the curves. Colours correspond to activity patterns.

The first strong evidence (where the reconstructed activity pattern was supported by modal PP values > 0.67) in mammals of an expansion of temporal niche into cathemerality is in the early Palaeogene (Cenozoic) for the SF phylogeny (no later than 65.8 Ma) or in the Late Cretaceous (Mesozoic) for the LF phylogeny (no later than 74.7 Ma) (Figs. 3 and 4). Although the LF phylogeny supports a Mesozoic shift to cathemerality, the modal PP values of the remaining 41 Mesozoic nodes were either nocturnal (23 nodes) or unclear—where all three activity patterns were supported by modal PP values < 0.67 (18 nodes). Using the SF phylogeny, we reconstructed the first transition to cathemerality in the MRCA of the order Cetartiodactyla (cetaceans and even-toed ungulates). This taxon was likely to be cathemeral (PPCath = 0.79, CrI: 0.72–0.87) and almost certainly exhibited considerable daytime activity (PPNoct = 0.02, CrI: 0.01–0.04) (Fig. 3). Using the LF phylogeny, the first cathemeral transition was in the MRCA of the families Soricidae (shrews) and Talpidae (moles) (PPCath = 0.81, CrI: 0.61–0.91; PPDiur = 0.07, CrI: 0.03–0.15) (Fig. 4).

Fig. 3: Reconstruction of ancestral activity patterns and character accumulation across the SF hypothesis of mammalian evolution.
Fig. 3

a, Ancestral activity pattern reconstruction across the SF phylogeny31 updated by ref. 32. Pie charts correspond to ancestral reconstructions at each node and pie colours denote the proportional value of the PP of each activity pattern, where nocturnal is blue, cathemeral is green and diurnal is yellow. Coloured shading denotes geological eras. Branch lengths are proportional to time, with branches younger than 45 Ma replaced by wedges for visualization purposes. The red dashed line represents the K–Pg boundary. b, A lineages-through-time plot for activity patterns. The predominant activity pattern was assigned to each node based on PP values, with a minimum value of 0.67. Nodes with reconstructed activity pattern PP values of < 0.67 were excluded.

Fig. 4: Reconstruction of ancestral activity patterns and character accumulation across the LF hypothesis of mammalian evolution.
Fig. 4

a, Ancestral activity pattern reconstruction across the LF phylogeny adapted from ref. 30. Pie charts correspond to ancestral reconstructions at each node and pie colours denote the proportional value of the PP of each activity pattern, where nocturnal is blue, cathemeral is green and diurnal is yellow. Coloured shading denotes geological eras. Branch lengths are proportional to time, with branches younger than 45 Ma replaced by wedges for visualization purposes. The red dashed line represents the K–Pg boundary. b, A lineages-through-time plot for activity patterns. The predominant activity pattern was assigned to each node based on PP values, with a minimum value of 0.67. Nodes with reconstructed activity pattern PP values of <0.67 were excluded.

Evidence of the evolution of diurnality (modal PP values > 0.67) first appears in the early Palaeogene (no later than 52.4 Ma for the SF phylogeny or 63.8 Ma for the LF phylogeny) (Figs. 3 and 4). Using the SF phylogeny, we reconstructed the transition to diurnality in the MRCA of the Simiiformes (all monkeys and apes) (PPDiur = 0.76, CrI: 0.75–0.78; PPCath = 0.23, CrI: 0.22–0.25) (Fig. 3). Using the LF phylogeny, the first taxon to exhibit diurnal activity was the MRCA of the family Macroscelididae (elephant shrews) (PPDiur = 0.77, CrI: 0.76–0.80; PPCath = 0.22, CrI: 0.19–0.23; 63.8 Ma), followed by the MRCA of the families Ctenodactylidae (comb rats, Rodentia) (PPDiur = 0.76, CrI: 0.73–0.78; 61.6 Ma), Camelidae (Cetartiodactyla) (PPDiur = 0.74, CrI: 0.72–0.77; 59.6 Ma) and Tupaiidae (tree shrews, Scandentia) (PPDiur = 0.99, CrI: 0.99-0.99; 51.1 Ma), in rapid succession (Fig. 4).

For both SF and LF phylogenies, we found that transition rates from a cathemeral pattern to either noctural or diurnal were about three times higher than the transition rates from either nocturnal or diurnal to cathemeral (Table 1). Furthermore, the transition rates in the SF reconstruction were three orders of magnitude lower than the respective rates in the LF reconstruction.

Table 1: Character transition rate matrix for SF and LF ancestral activity pattern reconstructions


We have shown that extant mammals probably originated from a nocturnal ancestor and that these ancestors remained nocturnal throughout the Mesozoic until either 9 million years before the K–Pg event (LF reconstruction) or just after it (SF reconstruction). On balance, our evidence suggests that mammals remained nocturnal throughout the Mesozoic, as nocturnal activity is strongly supported at most Mesozoic nodes in both SF and LF reconstructions. We found strong evidence that the shift to strict diurnality occurred after the K–Pg event (both SF and LF reconstructions), although cathemerality may have appeared in the Late Cretaceous (74.7 Ma in the LF reconstruction). Combined with other sources of evidence, such as the morphology of mammalian eyes10,23, the composition and reduced diversity of retinal photoreceptors12, 13,24,34 and the emphasis on alternative sensory systems11,15,16,17, our analysis helps to further establish the nocturnal ancestry of mammals and that diurnality only originated in mammals after the disapearance of the dinosaurs, as predicted by the nocturnal bottleneck hypothesis.

Even if we accept the appearance of cathemeral mammals as an expansion of the temporal niche before the K–Pg event, it does not necessarily provide strong evidence against the nocturnal bottleneck hypothesis. Declines in dinosaur diversity long before the K–Pg event have been suggested, either globally, starting at least 40 million years before the K–Pg event35, or locally—herbivorous dinosaurs in present-day North America were declining for up to 15 million years before the event20. In contrast, fossils show that mammals had evolved considerable eco-morphological diversity as early as the mid-Jurassic period (174–164 Ma) and diversified along all axes of the ecological niche36,37 except the temporal axis. Moreover, extensive mammal radiations occurred following the Cretaceous Terrestrial Revolution (120–80 Ma), whereby angiosperms rose to dominate the global flora and revolutionized eco-space30,38,39. Under such conditions, a partial invasion of mammals into the temporal niche of declining dinosaurs does not violate the assumption of temporal partitioning. Indeed, evidence of a shift in retinal opsin sensitivity (linked to more diurnal activity patterns) in some mammalian clades (cetartiodactyls, primates, carnivores and some Afrotheria orders) more than 70 Ma24,34 offers further support for a transition occurring during this period.

The MRCA of the infraorder Simiiformes (monkeys and apes) was among the first taxa to evolve diurnality (52.4 Ma in the SF reconstruction) and this is consistent with their evolution of diurnally adapted vision—specifically trichromacy and a low ratio of corneal diameter to axial length10,12,23, which is unique in mammals. Other diurnal clades, such as squirrels (Sciuridae) and elephant shrews (Macroscelididae), evolved at about the same time as the Simiiformes30,31 and presumably had similar opportunity to evolve comparable visual adaptations to diurnality. However, these groups rely on high ratios of retinal cones to rods for daylight vision14, suggesting that diurnality in Simiiformes may have evolved considerably earlier than the minimum date of 52.4 Ma. Simiiformes lie on an evolutionary branch that originated 83.2 Ma (SF), when they diverged from tarsiers—their closest living relatives in the suborder Haplorrhini. Tarsiers are strictly nocturnal, but share with the Simiiformes several adaptations for high visual acuity that are typical to diurnal vision28,40. The morphological and physiological adaptations to nocturnality in tarsiers are unlike those of any other nocturnal primate, suggesting that tarsiers originated from a diurnal ancestor—the MRCA of Haplorrhini—and secondarily adapted to nocturnal life5,6. The haplorrhine MRCA was a Mesozoic species that lived until 83.2 Ma (SF) or 78.1 Ma (LF). This would imply that Mesozoic mammals were able to break out of the nocturnal bottleneck and endure direct interactions with dinosaurs following the Cretaceous Terrestrial Revolution. Nevertheless, both reconstructions here, as well as other reconstructions of primate activity patterns based on different sets of data, including data on visual physiology, find weak or no evidence of the diurnality of the haplorrhine MRCA26,27,28.

There are other uncertainties around the dates for three of the four taxa identified as shifting to diurnality within 7 million years of the K–Pg in the LF reconstruction (Macroscelididae, Ctenodactylidae and Camelidae). This is due to how we re-scaled the terminal branches from ref. 30 to produce the species-level LF phylogeny. However, according to the dates given in ref. 30 and additional studies supporting the LF hypothesis41,42,43,44, these families originated in the Cenozoic, so our prediction of Cenozoic origins to mammal diurnality remains intact. The MRCA of Tupaiidae (Scandentia) and their closest living relative—the nocturnal Ptilocercidae (pen-tailed tree shrews, a monotypic family)—has been placed in the Cenozoic, 60.1 Ma (ref. 30). The LF reconstruction shows that this species was probably diurnal or cathemeral, but neither pattern was supported by PP values > 0.67.

On both SF and LF reconstructions, the rates of transition from cathemeral activity to either nocturnal or diurnal imply that the diurnal and nocturnal niches may be more favourable for mammals. However, our results unequivocally support the persistence of cathemerality in mammals since the K–Pg. In primates, it has been argued that cathemerality is adaptive under fluctuating environmental conditions26,45 and cathemeral species show higher speciation rates (although lower overall diversification rates) compared with nocturnal and diurnal species27. If these patterns are also true for the rest of Mammalia, they could explain the persistence of mammal cathemerality against the net outflow of species and slow diversification rates. In Lepidoptera (moths and butterflies), it has been argued that the persistence of a mixed (cathemeral) diel activity pattern is the result of conflicting predation pressures (from bats during the night and birds during the day)46. Hence, cathemeral activity may be preferred when strong selective forces are acting in opposite directions. The appearance of mammal cathemerality may have been due to high nocturnal predation risk on one side (perhaps from other mammals, making the nocturnal niche less advantageous) and the difficulties of adapting to a diurnal niche on the other.

The higher transition rates for the LF tree are probably a result of the method we used to construct the species-level LF phylogeny; that is, re-scaling the branch lengths of species-level clades from the SF phylogeny31 to maintain the length of the corresponding terminal branch provided by ref. 30. SF branch lengths were usually scaled down in this process because the SF generally estimates older divergence dates than the LF, reflecting the difference between the two phylogenetic models. A consequence of our grafting procedure is that a band of artificially short branches is formed near these graft points, which implies rapid change. Higher rates allow for more change along tree branches and reduce the precision of the results, which probably contributed to our LF reconstruction yielding fewer decisive predictions and lower statistical support compared with the SF reconstruction (Figs. 24). While a direct comparison of transition rates between the two phylogenetic hypotheses is therefore precluded, the broad pattern of transitions (that is, low transition rates into cathemerality and high transition rates out of it in either direction) is supported in both analyses, as is the general pattern of temporal niche evolution that emerges from the node reconstructions.

Although we have demonstrated the importance of the phylogenetic comparative approach to the investigation of the evolution of behavioural traits in mammals, ancestral reconstruction methods rely heavily on the accuracy of phylogenetic estimates. The LF hypothesis of mammalian evolutionary history is well supported30,41,44, but phylogenetic estimates are only available at the family level and further modification was required to add the species-level information for our analysis. Despite the attention attracted recently by studies of mammalian phylogenies30,41,44,47, only the SF hypothesis is represented by a species-level phylogeny, making the incorporation of the LF hypothesis and the explosive model problematic for phylogenetic comparative analyses that are based on detailed species-level data.

In conclusion, we argue that the activity patterns of Mesozoic mammals are consistent with the prediction of temporal partitioning and that the gradual acquisition of daytime activity in mammals (first cathemerality then diurnality) coincided with the decrease in pressure from dinosaurs, whether due to their decline or extinction. Given the current evidence, temporal partitioning within Mesozoic amniotes mostly followed the phylogenetic (mammal–archosaur) division, but while some dinosaurs invaded the nocturnal niche22, we find little support for Mesozoic mammals invading the diurnal niche. The constraints on mammals becoming diurnal during the Mesozoic would have been strong enough to counteract the ecological pressure to diversify, following at least 100 million years of mammalian sensory and eco-morphological radiations that sub-divided their nocturnal niches. Mammals diversified rapidly once they expanded outside the nocturnal niche, but whether invading the diurnal niche facilitated mammals’ Cenozoic success remains to be answered.



We collated activity records for 2,415 mammalian species, representing all 29 extant orders and 135 of 148 extant families from the PanTHERIA database8, as well as from published sources such as research articles, field guides and encyclopaedias (Supplementary Table 1). To achieve maximal representation of taxonomic diversity, we specifically targeted under-represented orders and repeated the process for under-represented families. Nonetheless, any records we found in this process were incorporated into our dataset, whether of a target taxon or not, unless a similar record (same species and activity pattern) was previously obtained. Although activity pattern data were only available for just under half (44.6%) of all known species48, 91.2% of families were represented in the database. The most under-represented taxa were the largest orders (Rodentia: 59% missing species; Chiroptera: 74%; Soricomorpha: 82%). Bats are almost entirely nocturnal and Soricomorpha is predominantly cathemeral (except the nocturnal Erinaceomorpha). In rodents too, activity patterns closely follow phylogeny29. Therefore, the inclusion of the missing species would probably have had only a minor effect, if any, on the character transition rate matrix and the overall reconstruction results.

We assigned each species to one of five activity patterns: (1) nocturnal—active only or mostly in the dark; (2) diurnal—active only or mostly during daylight hours; (3) cathemeral—active both during the day and during the night; (4) crepuscular—active only at twilight, around sunrise and/or sunset; and (5) ultradian—active in cycles of a few hours. We considered species nocturnal or diurnal based on qualitative descriptions in sources, as precise quantitative measurements are rare, where species described as ‘nocturnal’ or ‘active at night’ were assigned to nocturnal and species described as ‘diurnal’ or ‘active during daylight’ were assigned to diurnal. We also assigned species to these two categories if those descriptions were preceded by ‘only’, ‘exclusively’, ‘strictly’, ‘mostly’, ‘predominantly’, 'almost exclusively’ or ‘mainly'. Species that were described as ‘nocturnal and diurnal’, ‘active day and night’, ‘active at all hours’, ‘arrhythmic’ or ‘nocturnal in summer and diurnal in winter’ were assigned as having a cathemeral activity pattern. Crepuscular activity was assigned to species described as ‘mostly or mainly or predominantly crepuscular’, ‘active at dusk’, ‘active at dusk and dawn’, ‘around sunrise and sunset’ or ‘activity peaks in late afternoon or early evening’. Ultradian patterns were assigned when species were described as ‘ultradian’ or the source described several rhythmic cycles of activity and rest over a 24 h period. We follow the taxonomy and species binomials in Mammal Species of the World 3rd Edn.48, with one exception: we used Cetartiodactyla instead of the separate orders Artiodactyla and Cetacea, following refs 49,50. We resolved conflicts where sources disagreed on the species activity pattern as follows: (1) records of crepuscular activity (dusk or dawn), when in conjunction with nocturnal or diurnal activity, were changed to nocturnal or diurnal, respectively; (2) records from compiled sources were preferred over localized studies (which are prone to idiosyncrasies); and (3) records from more recent sources were preferred. This left 29 species unresolved and these species were excluded from subsequent analyses, giving a total of 2,386 species (1,426 nocturnal, 615 diurnal, 322 cathemeral, 22 crepuscular and 1 ultradian species).

Phylogenetic framework

We used two phylogenetic frameworks representing two of the main hypotheses of mammalian evolutionary history for our analyses: the SF hypothesis is represented by the species-level 'best dates' supertree31 updated from ref. 32 and the LF hypothesis is represented by the amino acid supermatrix phylogeny30 (Fig. 1). The SF hypothesis asserts that the MRCA of all extant mammals diverged into its daughter lineages (Prototheria and Theria) in the mid-Jurassic 166.2 Ma, whereas according to the LF hypothesis this divergence took place in the Late-Triassic 217.8 Ma. Both hypotheses agree that multiple extant lineages diverged in the Cretaceous and survived the K–Pg event (Fig. 1), but the SF hypothesis posits that intra-ordinal divergence of placental mammals had already begun before the K–Pg event, while the LF hypothesis places intra-ordinal divergence in the Cenozoic. A third evolutionary hypothesis—the explosive model—is supported by fossil evidence and morphological data47, but has been criticized for implying impossibly high rates of evolution in the early-Cenozoic radiation of placental mammals, as well as other problems41,51, so we do not consider it here.

Here, we represent the LF hypothesis using the family-level supermatrix phylogeny30 (downloaded from TreeBASE: on 1 March 2015). For our analyses, we rendered it ultrametric; that is, all the tips (species) of the tree are equidistant from the root, so that branch lengths are proportional to time. The LF hypothesis has recently gained support from several studies41,42,43,44, but it lacks species-level resolution, which is essential for our analysis. We therefore used each terminal branch of the supermatrix phylogeny (representing a taxonomic family) as a root branch onto which we appended the internal branching pattern of the family, as given in ref. 31 updated from ref. 32. To retain the original LF timeline, we scaled the appended branching pattern to 85% of its original supermatrix phylogeny branch length, and the root branch completed the remaining 15%. Other proportions (for example 70:30 or 50:50 branch scaling) would have compressed intra-family branching patterns, resulting in branch lengths that were very different from their original values. For this process, we used functions from the packages ape52 and phangorn53 in R version 3.2.3 (ref. 54). Species that we had data for but that were absent from the phylogenetic frameworks were omitted from the analyses: 33 species from the SF phylogeny and an additional 38 species and 3 families from the LF phylogeny, as families Aotidae, Pitheciidae and Lepilemuridae (Primates) were not originally included in the supermatrix phylogeny30. It is unlikely that the omission of these three families would have had an impact on our analysis as Pitheciidae and Lepilrmuridae are entirely diurnal and nocturnal, respectively, and conform to the activity pattern of the respective clades within which they are nested. Aotidae, on the other hand, is nocturnal. While this could potentially have altered the ancestral reconstruction results, Aotidae is nested within the otherwise exclusively diurnal Platyrrhini (new world monkeys)27, so its effect on the LF reconstruction would be minimal beyond the node immediately ancestral to Aotidae.


We used BayesTraits version 3 (ref. 33) to reconstruct the evolution of mammalian activity patterns. BayesTraits implements MCMC methods to sample from the posterior distributions of transition rates for a transition matrix describing the evolution of a discrete character. The obtained posterior distribution allows the user to infer the PP of each character state at the root and at each internal node of the phylogeny. By employing rjMCMC, BayesTraits is also able to sample from the posterior distribution of model configurations and optimize the number of parameters in the model. This removes the need for comparing models with different numbers of parameters by sampling from model space and parameter space concurrently55.

We only considered the three main activity patterns across mammals in our analysis (nocturnal, diurnal and cathemeral) in order to reduce the complexity of the model and increase its biological interpretability (four transition rates instead of 16). Additionally, we removed ultradian activity patterns as these are mostly found in polar and subterranean species, where the 24 h cycle is of reduced importance. This meant that the total number species used was 2,330 from 135 families (nocturnal: 1,399; diurnal: 610; cathemeral: 321) for the SF analysis, and 2,292 species from 132 families (nocturnal species: 1,384; diurnal: 588; cathemeral: 320) for the LF analysis. We use an ordered model of trait evolution: nocturnal ↔ cathemeral ↔ diurnal, whereby direct nocturnal ↔ diurnal transitions are not allowed (set to zero). A transition from diurnal to nocturnal (or vice versa) would therefore involve at least two ‘steps’, passing through cathemeral, although both steps may occur along the same branch. This ordered model reflects the continuous and mutually exclusive nature of morphological and histological adaptations to diurnality and nocturnality (for example, the retinal-rod-to-cone ratio, corneal-diameter-to-axial-length ratio and front-facing versus lateral-facing eye sockets), while cathemerality involves an intermediate state of the relevant phenotypes23,56. Our underlying hypothesis is that during shifts from diurnality to nocturnality (and vice versa) species go through a phase of cathemeral capability during which they are equally well adapted to both. All other transition rates were free to take any value. We used rjMCMC to estimate the optimal model configuration55. As activity pattern in our analyses was not a binary trait, we used the ‘multistate’ mode of BayesTraits to sample from the posterior distribution of transition rates between activity pattern categories. For each phylogeny, we opted for the rjMCMC procedure and set a wide uniform prior bounded between 0 and 100 for all transition rates to ensure that our prior did not have a strong effect on the nature of the posterior. Each rjMCMC chain was run until convergence was reached (at least one million iterations), after which the chains were sampled every 4,000 iterations until a posterior of 1,000 samples was obtained. We chose this wide sampling interval to minimize autocorrelation in our posterior samples. We ran 12 replicates of each chain (corresponding to a phylogeny) to ensure consistency and that each independent run converged on the same posterior distribution. The marginal likelihoods of each chain were calculated using the stepping stone sampler57 as implemented in BayesTraits (500 stones, 1,000 iterations per stone) and compared between independent replicates to ensure consistency.

To estimate the character state at each internal node, we used the modal value of the PP of each character state, calculated as the peak value of the kernel density of each posterior distribution. For each PP distribution, we reported the 95% CrI—the highest density interval covering 95% of the posterior distribution. We used the R package phytools58 to plot the PP values of each node on the mammal phylogenies (Figs. 3 and 4). To measure the accumulation of mammalian temporal niches over time, we calculated the running total of nodes (lineages) where an activity pattern was supported with PP > 0.67, and plotted this along the mammal evolution timeline (Figs. 3 and 4). A confidence threshold of 0.67 meant that the PP values of the best-supported state were at least 0.34 higher (or twice as likely) than the second most probable state. The PP distributions of either state would have to be extremely flat to make the difference between two peak values smaller than two standard deviations. The threshold of 0.67 thus ensures small to no overlap between two distributions.

Estimates of character transition rates and reconstructions of ancestral states can be inaccurate if certain character states lead to very different diversification rates59, and methods such as BayesTraits do not account for the effects of character states on diversification rates. We reanalysed our data to investigate the robustness of our analysis with an additional method, multistate speciation and extinction (MuSSE60), to control for differences in diversification rates. However, this method requires fully bifurcating phylogenetic trees or, if polytomies are present, that all branches in the phylogenies descending from them are collapsed60. To enable a MuSSE reconstruction, we used maximum clade credibility, implemented in the R package phangorn53, to summarize a single, fully bifurcating tree from a distribution of 100 fully bifurcating trees61 randomly derived from the SF phylogeny used in the BayesTraits analysis. We could only perform this analysis on the SF phylogeny as the mosaic nature of the LF phylogeny meant that the resulting tree from random resolution was very similar to the SF tree. We acknowledge that random resolution of polytomies may result in unlikely topologies and incorrect branch lengths, but that is a pragmatic solution to the incompleteness of mammalian phylogenetic information available. As the results of the MuSSE reconstruction were very similar to those obtained by the BayesTraits analysis and did not change our overall conclusions (Supplementary Fig. 1 and Supplementary Table 2), our results are likely robust to the differential diversification rates in activity patterns.

Life Sciences Reporting Summary

Further information on experimental design and reagents is available in the Life Sciences Reporting Summary.

Code availability

Computer code essential for replicating the results in this study is available on Figshare (doi: 10.6084/m9.figshare.4797367).

Data availability

The authors declare that all data supporting the findings of this study are available within the paper and its Supplementary Information files. All data are available on Figshare (doi: 10.6084/m9.figshare.4775416; doi: 10.6084/m9.figshare.4774648).

Additional Information

Publisher’s note: Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.


  1. 1.

    Aronson, B. D. et al. Circadian rhythms. Brain Res. Rev. 18, 315–333 (1993).

  2. 2.

    Kronfeld-Schor, N. & Dayan, T. Partitioning of time as an ecological resource. Annu. Rev. Ecol. Evol. Syst. 34, 153–181 (2003).

  3. 3.

    DeCoursey, P. J. Diversity of function of SCN pacemakers in behavior and ecology of three species of sciurid rodents. Biol. Rhythm Res. 35, 13–33 (2004).

  4. 4.

    Hut, R. A., Kronfeld-Schor, N., van der Vinne, V. & De la Iglesia, H. in Progress in Brain Research: The Neurobiology of Circadian Timing Vol. 199 (eds Kalsbeek, A., Merrow, M., Roenneberg, T. & Foster, R. G.) 281–304 (Elsevier, Amsterdam, 2012).

  5. 5.

    Joffe, B., Peichl, L., Hendrickson, A., Leonhardt, H. & Solovei, I. Diurnality and nocturnality in primates: an analysis from the rod photoreceptor nuclei perspective. Evol. Biol. 41, 1–11 (2014).

  6. 6.

    Melin, A. D., Matsushita, Y., Moritz, G. L., Dominy, N. J. & Kawamura, S. Inferred L/M cone opsin polymorphism of ancestral tarsiers sheds dim light on the origin of anthropoid primates. Proc. R. Soc. B 280, 20130189 (2013).

  7. 7.

    Gutman, R. & Dayan, T. Temoral partitioning: a experiment with two species of spiny mice. Ecology 86, 164–173 (2005).

  8. 8.

    Jones, K. E. et al. PanTHERIA: a species-level database of life history, ecology, and geography of extant and recently extinct mammals. Ecology 90, 2648–2648 (2009).

  9. 9.

    Refinetti, R. The diversity of temporal niches in mammals. Biol. Rhythm Res. 39,173–192 (2008).

  10. 10.

    Heesy, C. P. & Hall, M. I. The nocturnal bottleneck and the evolution of mammalian vision. Brain Behav. Evol. 75, 195–203 (2010).

  11. 11.

    Walls, G. L. The Vertebrate Eye and its Adaptive Radiation (Cranbrook Institute of Science, Bloomfield Hills, 1942).

  12. 12.

    Davies, W. I. L., Collin, S. P. & Hunt, D. M. Molecular ecology and adaptation of visual photopigments in craniates. Mol. Ecol. 21, 3121–3158 (2012).

  13. 13.

    Gerkema, M. P., Davies, W. I. L., Foster, R. G., Menaker, M. & Hut, R. A. The nocturnal bottleneck and the evolution of activity patterns in mammals. Proc. R. Soc. B 280, 20130508 (2013).

  14. 14.

    Peichl, L. Diversity of mammalian photoreceptor properties: adaptations to habitat and lifestyle? Anat. Rec. 287A, 1001–1012 (2005).

  15. 15.

    Hayden, S. et al. Ecological adaptation determines functional mammalian olfactory subgenomes. Genome Res. 20, 1–9 (2010).

  16. 16.

    Coleman, M. N. & Boyer, D. M. Inner ear evolution in primates through the Cenozoic: implications for the evolution of hearing. Anat. Rec. 295, 615–631 (2012).

  17. 17.

    Diamond, M. E., von Heimendahl, M., Knutsen, P. M., Kleinfeld, D. & Ahissar, E. ‘Where’ and ‘what’ in the whisker sensorimotor system. Nat. Rev. Neurosci. 9, 601–612 (2008).

  18. 18.

    Crompton, A. W., Taylor, C. R. & Jagger, J. A. Evolution of homeothermy in mammals. Nature 272, 333–336 (1978).

  19. 19.

    Barnosky, A. D. et al. Has the Earth’s sixth mass extinction already arrived? Nature 471, 51–57 (2011).

  20. 20.

    Brusatte, S. L. et al. The extinction of the dinosaurs. Biol. Rev. 90, 628–642 (2015).

  21. 21.

    Angielczyk, K. D. & Schmitz, L. Nocturnality in synapsids predates the origin of mammals by over 100 million years. Proc. R. Soc. B 281, 20141642 (2014).

  22. 22.

    Schmitz, L. & Motani, R. Nocturnality in dinosaurs inferred from scleral ring and orbit morphology. Science 332, 705–708 (2011).

  23. 23.

    Hall, M. I., Kamilar, J. M. & Kirk, E. C. Eye shape and the nocturnal bottleneck of mammals. Proc. R. Soc. B 279, 4962–4968 (2012).

  24. 24.

    Emerling, C. A., Huynh, H. T., Nguyen, M. A., Meredith, R. W. & Springer, M. S. Spectral shifts of mammalian ultraviolet-sensitive pigments (short wavelength-sensitive opsin 1) are associated with eye length and photic niche evolution. Proc. R. Soc. B 282, 20151817 (2015).

  25. 25.

    Reppert, S. M. & Weaver, D. R. Molecular analysis of mammalian circadian rhythms. Annu. Rev. Physiol. 63, 647–676 (2001).

  26. 26.

    Griffin, R. H., Matthews, L. J. & Nunn, C. L. Evolutionary disequilibrium and activity period in primates: a Bayesian phylogenetic approach. Am. J. Phys. Anthropol. 147, 409–416 (2012).

  27. 27.

    Santini, L., Rojas, D. & Donati, G. Evolving through day and night: origin and diversification of activity pattern in modern primates. Behav. Ecol. 26, 789–796 (2015).

  28. 28.

    Heesy, C. P. & Ross, C. F. Evolution of activity patterns and chromatic vision in primates: morphometrics, genetics and cladistics. J. Hum. Evol. 40, 111–149 (2001).

  29. 29.

    Roll, U., Dayan, T. & Kronfeld-Schor, N. On the role of phylogeny in determining activity patterns of rodents. Evol. Ecol. 20, 479–490 (2006).

  30. 30.

    Meredith, R. W. et al. Impacts of the Cretaceous Terrestrial Revolution and K–Pg extinction on mammal diversification. Science 334, 521–524 (2011).

  31. 31.

    Bininda-Emonds, O. R. P. et al. The delayed rise of present-day mammals. Nature 446, 507–512 (2007).

  32. 32.

    Fritz, S. A., Bininda-Emonds, O. R. P. & Purvis, A. Geographical variation in predictors of mammalian extinction risk: big is bad, but only in the tropics. Ecol. Lett. 12, 538–549 (2009).

  33. 33.

    Meade, A. & Pagel, M. BayesTraits: A Computer Package for Analyses of Trait Evolution. Version 3 (2017);

  34. 34.

    Melin, A. D. et al. Euarchontan opsin variation brings new focus to primate origins. Mol. Biol. Evol. 33, 1029–1041 (2016).

  35. 35.

    Sakamoto, M., Benton, M. J. & Venditti, C. Dinosaurs in decline tens of millions of years before their final extinction. Proc. Natl Acad. Sci. USA 113, 5036–5040 (2016).

  36. 36.

    Close R. A., Friedman, M., Lloyd G. T. & Benson R. B. J. Evidence for a mid-Jurassic adaptive radiation in mammals. Curr. Biol. 25, 2137–2142 (2015).

  37. 37.

    Lee, M. S. Y. & Beck, R. M. D. Mammalian evolution: a Jurassic spark. Curr. Biol. 25, R759–R761 (2015).

  38. 38.

    Wilson G. P. et al. Adaptive radiation of multituberculate mammals before the extinction of dinosaurs. Nature 483, 457–460 (2012).

  39. 39.

    Krause, D. W. et al. First cranial remains of a gondwanatherian mammal reveal remarkable mosaicism. Nature 515, 512–517 (2014).

  40. 40.

    Ross, C. F. Into the light: the origin of Anthropoidea. Annu. Rev. Anthropol. 29, 147–194 (2000).

  41. 41.

    Dos Reis, M., Donoghue, P. C. J. & Yang, Z. Neither phylogenomic nor palaeontological data support a Palaeogene origin of placental mammals. Biol. Lett. 10, 20131003 (2014).

  42. 42.

    Foley, N. M., Springer, M. S. & Teeling, E. C. Mammal madness: is the mammal tree of life not yet resolved? Phil. Trans. R. Soc. B 371, 20150140 (2016).

  43. 43.

    Tarver, J. E. et al. The interrelationships of placental mammals and the limits of phylogenetic inference. Genome Biol. Evol. 8, 330–344 (2016).

  44. 44.

    Springer, M. S. et al. Waking the undead: implications of a soft explosive model for the timing of placental mammal diversification. Mol. Phylogenet. Evol. 106, 86–102 (2017).

  45. 45.

    Donati, G. & Borgognini-Tarli, S. M. From darkness to daylight: cathemeral activity in primates. J. Anthropol. Sci. 84, 7–32 (2006).

  46. 46.

    Fullard, J. H. & Napoleone, N. Diel flight periodicity and the evolution of auditory defences in the Macrolepidoptera. Anim. Behav. 62, 349–368 (2001).

  47. 47.

    O’Leary, M. A. et al. The placental mammal ancestor and the post-K–Pg radiation of placentals. Science 339, 662–667 (2013).

  48. 48.

    Wilson, D. E. & Reeder, D. A. Mammal Species of the World (John Hopkins Univ. Press, Baltimore, 2005).

  49. 49.

    Price, S. A., Bininda-Emonds, O. R. P. & Gittleman, J. L. A complete phylogeny of the whales, dolphins and even-toed hoofed mammals (Cetartiodactyla). Biol. Rev. 80, 445–473 (2005).

  50. 50.

    O’Leary, M. A. & Gatesy, J. Impact of increased character sampling on the phylogeny of Cetartiodactyla (Mammalia): combined analysis including fossils. Cladistics 24, 397–442 (2008).

  51. 51.

    Springer, M. S., Meredith, R. W., Teeling, E. C. & Murphy, W. J. Technical comment on “The placental mammal ancestor and the Post-K–Pg radiation of placentals”. Science 341, 613–613 (2013).

  52. 52.

    Paradis, E., Claude, J. & Strimmer, K. APE: analyses of phylogenetics and evolution in R language. Bioinformatics 20, 289–290 (2004).

  53. 53.

    Schliep, K. P. phangorn: phylogenetic analysis in R. Bioinformatics 27, 592–593 (2011).

  54. 54.

    R Development Core Team R: A Language and Environment for Statistical Computing (R Foundation for Statistical Computing, Vienna, 2015).

  55. 55.

    Pagel, M. & Meade, A. Bayesian analysis of correlated evolution of discrete characters by reversible-jump Markov chain Monte Carlo. Am. Nat. 167, 808–825 (2006).

  56. 56.

    Kirk, E. C. Effects of activity pattern on eye size and orbital aperture size in primates. J. Hum. Evol. 51, 159–170 (2006).

  57. 57.

    Xie, W., Lewis, P. O., Fan, Y., Kuo, L. & Chen, M.-H. Improving marginal likelihood estimation for Bayesian phylogenetic model selection. Syst. Biol. 60,150–160 (2011).

  58. 58.

    Revell, L. J. phytools: an R package for phylogenetic comparative biology (and other things). Methods Ecol. Evol. 3, 217–223 (2012).

  59. 59.

    Maddison, W. P. Confounding asymmetries in evolutionary diverification and character change. Evolution 60, 1743–1746 (2006).

  60. 60.

    FitzJohn, R. G. Diversitree: comparative phylogenetic analyses of diversification in R. Methods Ecol. Evol. 3, 1084–1092 (2012).

  61. 61.

    Kuhn, T. S., Mooers, A. Ø. & Thomas, G. H. A simple polytomy resolver for dated phylogenies. Methods Ecol. Evol. 2, 427–436 (2011).

Download references


We thank T. C. D. Lucas, S. Meiri, E. E. Dyer, O. Comay and I. Pizer-Mason for technical assistance and providing data, and N. Kronfeld-Schor for discussion. This work was funded with support from Israel Science Foundation grant 785/09 (to T.D.), the Tel Aviv University Global Research and Training Fellowship fund and Naomi Kadar Foundation (to R.M.), and a NERC Open CASE PhD studentship (NE/H018565/1) (to H.F.-G.).

Author information


  1. School of Zoology, George S. Wise Faculty of Life Science, Tel Aviv University, Tel Aviv, 6997801, Israel

    • Roi Maor
    •  & Tamar Dayan
  2. Centre for Biodiversity and Environment Research, Department of Genetics, Evolution and Environment, University College London, Gower Street, London, WC1E 6BT, UK

    • Roi Maor
    • , Henry Ferguson-Gow
    •  & Kate E. Jones
  3. The Steinhardt Museum of Natural History, Tel Aviv University, Tel Aviv, 6997801, Israel

    • Tamar Dayan
  4. Institute of Zoology, Zoological Society of London, Regent’s Park, London, NW1 4RY, UK

    • Kate E. Jones


  1. Search for Roi Maor in:

  2. Search for Tamar Dayan in:

  3. Search for Henry Ferguson-Gow in:

  4. Search for Kate E. Jones in:


R.M., T.D. and K.E.J. developed the overall study design. R.M. collected and processed the data and carried out the analyses with assistance from H.F.-G. R.M. and K.E.J. led on the writing of the paper with significant contributions from all authors.

Competing interests

The authors declare no competing financial interests.

Corresponding authors

Correspondence to Roi Maor or Kate E. Jones.

Electronic supplementary material

  1. Supplementary Information

    Supplementary figure and table.

  2. Life Sciences Reporting Summary

  3. Supplementary Table

    Table with activity pattern data for 2415 mammalian species.