A long-held belief about the Tyrannosaurus rex has been called into question thanks to modern research into alligators.

New research from the University of Missouri shows that the famous dinosaur may have had an internal mechanism in its skull to regulate its body temperature.

The finding upends the long-held belief that two holes in the T. rex's skull were filled with muscles that helped the imposing beasts move their jaws.

Anatomy professor Casey Holliday never understood that theory, as it didn't jibe with his understanding of animal forms.

"It's really weird for a muscle to come up from the jaw, make a 90-degree turn, and go along the roof of the skull," he said in a statement.

To try and solve this mystery, Holliday led a team that analyzed alligators in Florida. Alligators have similar holes in their skulls. Theirs are full of blood vessels.

Using thermal imaging devices, the researchers found that the alligators' skull holes were warmer during cooler weather – when they would be trying to warm up – and cooler at warmer times.

"This is consistent with prior evidence that alligators have a cross-current circulatory system – or an internal thermostat, so to speak," University of Florida biologist Kent Vliet said in the statement.

The researchers say this suggests that the holes in the T. rex skull likely served the same purpose of regulating temperature.