TORONTO -- A dinosaur-related puzzle that baffled scientists for more than half a century has been solved.

The mystery dates back to 1954, when one researcher reported discovering dinosaur footprints on the ceiling of a cave in Queensland, Australia.

Scientists were able to date the footprints back nearly 200 million years, to the early Jurassic era, but what confused them was that it seemed to show the dinosaur walking on all fours – an implausible behaviour, according to University of Queensland paleontologist Anthony Romilio.

"You don't assume T. rex used its arms to walk, and we didn't expect one of its earlier predatory relatives of 200 million years ago did either," he said in a press release.

The lack of further clues from the cave at Mount Morgan left scientists unable to determine whether the prints were some sort of aberration, or surprising evidence that ancestors of the T. rex might have once been quadrupedal.

Romilio thinks he's been able to crack the case thanks to a chance conversation with a dentist.

The dentist, Roslyn Dick, told him that her father had been part of the Mount Morgan research, and that she and her sisters had held onto his work.

"I'm sure Anthony didn't believe me until I mentioned my father's name – Ross Staines," Dick said in the press release.

Recognizing Staines as someone who was indeed involved with the Mount Morgan discovery, Romilio's curiosity was piqued. When Dick showed him the notebooks and photographs her father had left behind – including a plaster cast of a dinosaur footprint kept in her sister's cupboard – he realized he could finally piece together the puzzle.

"In combination with our current understanding of dinosaurs, it told a pretty clear-cut story," he said.

The high-resolution photos helped Romilio and his team deduce that all of the prints were from feet, not hands. They then realized that they weren't looking at the tracks of one dinosaur, but of two that travelled together. They even managed to figure out how the prints ended up on the ceiling of the cave.

"The dinosaurs walked on the lake sediment and these imprints were covered in sand. In the Mount Morgan caves, the softer lake sediment eroded away and left the harder sandstone in-fills," Romilio said.

The work of Romilio and his team was published Feb. 13 in the journal Historical Biology.