WASHINGTON — Ferocious, meat-eating dinosaurs were equipped with night vision that helped them stalk their prey in the dark, according to a study published Thursday in the journal Science.

Plant-eating dinosaurs could also see a fair bit at night, because they likely had to eat round the clock to keep their bellies satisfied, while flying dinosaurs, like birds, were active only during the day, said the study.

Researchers at the University of California, Davis, were able to make these judgments by studying the eye area of fossilized dinosaurs.

By taking measurements of the bony circle called the "scleral ring" in their eye and comparing it to the eye socket size in 164 living lizards and birds as well as 33 dinosaur fossils, scientists could tell which ones saw in the dark.

Animals that are mainly active by day have a smaller opening in the scleral ring, while nocturnal creatures had a much larger opening, said the study. Those who roamed day and night fell somewhere in between.

Early birds and flying dinos known as pterosaurs were mostly daytime hunters, according to their eye measurements.

Velociraptors, the type featured in the movie "Jurassic Park," were likely night-stalkers.

Scientists could not say the same about the massive meat-gnashing Tyrannosaurus rex however, because they didn't have any well-preserved eye fossils of theirs to examine.

The study counters the widely held belief that most dinosaurs hunted by day while smaller mammals roamed at night.

"It was a surprise, but it makes sense," said co-author Ryosuke Motani, professor of geology at UC Davis.