摘要:Nocturnality is a key evolutionary innovation of mammals that enables mammals to occupy relatively empty nocturnal niches. Invasion of ancestral mammals into nocturnality has long been inferred from the phylogenetic relationships of crown Mammalia, which is primarily nocturnal, and crown Reptilia, which is primarily diurnal, although molecular evidence for this is lacking. Here we used phylogenetic analyses of the vision genes involved in the phototransduction pathway to predict the diel activity patterns of ancestral mammals and reptiles. Our results demonstrated that the common ancestor of the extant Mammalia was dominated by positive selection for dim-light vision, supporting the predominate nocturnality of the ancestral mammals. Further analyses showed that the nocturnality of the ancestral mammals was probably derived from the predominate diurnality of the ancestral amniotes, which featured strong positive selection for bright-light vision. Like the ancestral amniotes, the common ancestor of the extant reptiles and various taxa in Squamata, one of the main competitors of the temporal niches of the ancestral mammals, were found to be predominate diurnality as well. Despite this relatively apparent temporal niche partitioning between ancestral mammals and the relevant reptiles, our results suggested partial overlap of their temporal niches during crepuscular periods.