A previous version of the story incorrectly spelled Karoo Basin as Kasoo Basin.

An unlikely pair was discovered in a burrow in South Africa. Scientists uncovered a young amphibian seeking shelter and a mammal forerunner locked in an ancient embrace.

Scientists believe the ancient “odd couple” was entombed in a flash flood that took place 250 million years ago. They were discovered after a synchrotron X-ray scans of a cast taken from the Karoo Basin in South Africa showed the curled-up skeletons. The results were published in Friday’s edition of the journal PLOS One, LiveScience reports.

"While discovering the results we were amazed by the quality of the images, but the real excitement came when we discovered a second set of teeth completely different from that of the mammal-like reptile," study researcher Vincent Fernandez of Wits University, South Africa, said in a statement. "It was really something else."

The images were taken using the European Synchrotron Radiation Facility (ESRF), which allows X-rays to be taken without destroying the burrow. The scan created a three-dimensional reconstruction of the burrow that revealed there were two animals sharing the shelter.

The scans showed that a young amphibian that suffered from broken ribs crawled into a burrow that belonged to a cynodont, considered a distant ancestor of mammals. Scientists say the wounded amphibian was seeking protection and the two animals became trapped and fossilized after a flash flood, RedOrbit reports. At the time of the flood, scientists believe the animals were aestivating, a period of dormancy.

The mammal-like reptile is called Thrinaxodon and the amphibian is the Broomistega. Fernandez says the Broomistega remains are the first complete skeleton of the species that has ever been discovered.

The pair was living in the Karoo Basin, which belonged to the ancient supercontinent Gondwana at the start of the Triassic Period. Their world suffered from mass extinction that destroyed most life on Earth. To survive the hostile environment, many sought shelter by digging burrows, researchers say.