An astonishing new fossil unearthed in China has overturned the accepted view about the relationship between dinosaurs and early mammals.
The specimen belongs to a primitive mammal about 130 million years old and its stomach contents show that it ate young dinosaurs called psittacosaurs.
A US-Chinese team of researchers has described the find in Nature magazine.
In the same issue, the group reports discovering the largest known primitive mammal from the same locality.
The team found the Early Cretaceous specimens in the famous fossil beds of Liaoning Province in north-eastern China.
The mammal with the dinosaur in its stomach belongs to a carnivorous mammal called Repenomamus robustus, which was about the size of an opossum.
"At first, we thought it was a placental mammal carrying an embryo. But then we looked more closely and saw it was a dinosaur," said co-author Dr Meng Jin, curator of palaeontology at the American Museum of Natural History.
"The position was also interesting; it was located in the lower left side of the fossil - exactly the position where the stomach is located in extant mammals."
The new species of mammal, also found by the researchers in Liaoning, was probably about 50% larger - weighing about 13kg (30lbs). It has been named Repenomamus gigantus.
But fragmentary evidence from Liaoning suggests even bigger mammals may have prowled the region during the Cretaceous.
"This find has helped to break a stereotype about early mammals," said Dr Zhe-Xi Luo, a palaeontologist at the Carnegie Museum of Natural History in Pittsburgh, US, who also studies early mammals.
Most mammal fossils from the time of the dinosaurs are about the size of mice and rats. As such, they were at a distinct size disadvantage compared with predatory dinosaurs.
The combined discovery of a dinosaur in the stomach of R. robustus and the dog-sized R. gigantus suggests mammals were not the timid insect-eaters they have been portrayed as in the past.
"Mammals at this time were thought to have lived in the shadow of the dinosaurs. But the picture is quite different now," Dr Jin told the BBC News website.
Dr Jin and Dr Luo both agree that the general picture that primitive mammals were small, nocturnal prey animals still holds true.
But, said Dr Luo: "We have always suspected the feeding niches of early mammals were more diverse, but we never had the proof."
Interestingly, many small dinosaur fossils have been found in the same beds as the new mammals. The researchers cannot yet say whether mammals dominated their reptilian counterparts at this location.
Big mammals like Repenomamus could have been prey for larger dinosaurs that have not yet been seen here. But broadly speaking, carnivores usually reside at the top of food chains.
The wonderfully preserved specimens were pulled from the Yixian Formation, a class of fossil beds in the Liaoning Formation.
This formation has produced an abundance of amazing fossils, including feathered dinosaurs, early birds, fish and mammals.
Dr Jin thinks the astounding preservation of these fossils may be down to how the animals died.
"The bottom section of the Yixian Formation is sandstone with a lot of volcanic ash in it. Many of the fossils are preserved in a resting position. Some of them look as if they are sleeping.
"It could be that poisonous gas produced by volcanism killed many animals while they were asleep."