From the time that dinosaur fossils were first discovered, these creatures have fascinated scientists and laypeople alike. In the academic world, their remains provide important clues into the prehistoric world; in popular culture, dinosaurs have inspired blockbuster hits, such as Jurassic Park and King Kong.

Now, a research team headed by Professor Hagit Affek at the Hebrew University of Jerusalem’s Institute of Earth Sciences has unlocked a mystery that has stymied researchers for decades: How did dinosaurs regulate their body temperatures? Were they warm-blooded or cold-blooded?

Affek’s study, published in Science Advances, relies on a novel method to measure historical temperatures. Called clumped isotope geochemistry, this method analyzes chemical bonds among heavy isotopes in calcium carbonate minerals–the main ingredient in egg shells. This allows scientists to calculate both the temperature at which the minerals formed and the body temperature of the mother that laid the egg.

Affek and her team applied this method to fossilized eggs from three distinct dinosaur species along the evolutionary path from reptile to bird and found that their body temperature ranged from 35-40 degrees Celsius. However, this bit of information still did not answer the question as to whether dinosaurs were endothermic or exothermic, meaning, did they generate their own body heat or get warm from the sun and their environment?

“The global climate during the dinosaur era was significantly warmer than it is today. For this reason, measuring only the body temperatures of dinosaurs who lived near the equator wouldn’t tell us whether they were endo- or exothermic because their body temperature may simply have been a cold-blooded response to the hot climates they lived in,” shared Affek.

To address this issue, her team focused on dinosaurs that lived in high latitudes like Alberta, Canada—far enough north to ensure that their warm body temperatures were the result of an internal, metabolic warming process rather than merely reflecting the climate around them.

To verify their hypothesis, Affek and her team needed to determine the environmental temperature in Alberta back when dinosaurs lived. They accomplished this by applying their isotope method to mollusk shells that lived in Alberta alongside the dinosaurs. Since mollusks are cold-blooded creatures, they reflect the ambient climate of the time. The mollusks’ body temperature measured 26°C and showed that the dinosaurs living in Alberta were endothermic; otherwise, they could not have maintained a body temperature of 35-40°C.

As dinosaurs evolved, they moved from lizard-like (cold-blooded) characteristics to avian (warm-blooded) ones. “We believe that this transformation happened very early on in dinosaurs’ evolution since the Mayasaura eggs—a lizard-like dinosaur species that we tested—were already able to self-regulate their body temperature, just like their warm-blooded, bird-like cousins, the Torrdons,” explained Affek.

The fact that both of these species, located at opposite ends of the dinosaur evolutionary tree, had body temperatures higher than those of their environment means that both had the ability to warm themselves.

Either way, Mother of Dragons, if your baby is showing a fever of 41 degrees, it’s time to call the doctor.