A new study by researchers at the University of California Davis offers persuasive evidence that small carnivorous dinosaurs like velociraptors hunted by night, while their larger, plant-eating counterparts foraged intermittently 24 hours a day. Their findings, published this week in the journal Science, challenge the prevailing assumption that dinosaurs dominated the daylight hours, leaving early mammals no choice but to venture out at night.

“We can now clearly demonstrate that dinosaurs were not strictly day-active,” explained Lars Schmitz, a postdoctoral researcher and co-author of the paper. “We can solidly end the view that all dinosaurs were diurnal whereas mammals were nocturnal. If mammals truly–which still needs to be shown–were hiding from the dinosaurs in the dark, the dinosaurs were certainly capable of following them.”

Schmitz and his colleague, Ryosuke Motani, a professor of geology and co-author of the paper, reached these groundbreaking conclusions about dinosaurs’ daily schedules after verifying that eye size and dimensions can accurately predict whether animals are active by day, by night or at all hours. Diurnal (day-active) animals feature a small opening in the middle of their scleral ring, the bony ocular structure found in dinosaurs, lizards and birds but not in humans and other mammals. Nocturnal animals have a much larger opening, while cathemeral creatures—which roam about regardless of the time—fall somewhere in between.

The researchers compared the scleral rings and eye sockets of dinosaurs and other ancient beasts to those of 164 living species with known habits. They discovered that plant-eating dinosaurs probably grazed by night and day, much like modern herbivores such as elephants. Small carnivorous dinosaurs like the spry velociraptors of “Jurassic Park” fame, meanwhile, prowled for prey by the light of the moon. (Large carnivores such as Tyrannosaurus rex were excluded from the study because no fossils with sufficiently preserved scleral rings were available.)

“It was a surprise, but it makes sense,” Motani said of the study’s results. For example, large herbivores probably needed to snack around the clock because of their massive metabolisms. As for predators like velociraptors, it has already been established that they benefit from the cover of darkness while stalking their victims.

Perhaps most of all, the study raises major questions about the behavior patterns of early mammals, which were previously thought to have a monopoly on nocturnality, said H. Richard Lane, program director in the National Science Foundation’s Division of Earth Sciences, which funded the research along with the German government. Modern mammals can be diurnal, nocturnal or cathemeral, with human beings falling into the first category.