A bizarre bat-like dinosaur that lived 163 million years ago has been unearthed for the first time in China
The small feathered creature had thin, membrane wings - just like modern day bats.
The new discovery was so well preserved even the stomach contents remain - showing it ate animals as well as plants.
And feathers can still be seen around the head, neck and the shoulders, said corresponding author Dr Min Wang.
Named Ambopteryx longibrachium, it sheds fresh light on the evolution of flight - and adds to evidence that birds are living ancestors of the prehistoric reptiles.
The newly identified species belonged to a group called the scansoriopterygids - tree climbers with very long hands and fingers.
About the size of a magpie, it weighed about 11 ounces (306 grams) and spent most of its time in trees - or gliding between them.
It would have swooped down on frogs, lizards and rats scurrying around the undergrowth. Previously these dinosaurs were only thought to have eaten plants.
Powerful state-of-the-art microscopes showed stones called gastroliths that some dinosaurs swallowed to grind up tough foliage in the stomach.
Describing Amboteryx in the journal Nature, Dr Wang said until now the diet of scansoriopterygids was unknown.
Dr Wang explained: "The gastroliths and possible stomach contents preserved in Ambopteryx provide the some direct clues from which we can draw dietary inferences."
The small number of gastroliths suggests it was an omnivore. A herbivore that relied only on plants for its diet would have had more.
The stomach also appeared to contain bone - adding to evidence it preyed on mammals and other animals.
Ambopteryx had about 20 stones and unidentified bony fragments at the front the pelvis and under the spine - gastroliths and ingested remains, respectively.
Dr Wang, of the Chinese Academy of Sciences in Beijing, said scansoriopterygids had said short skulls with large front teeth.
Dr Wang said: "Considering the unusual dental morphology of the scansoriopterygid clade, we suggest this group may have been omnivorous."
Read more from Yahoo News UK:
This means it would have eaten foliage and prehistoric animals that had evolved in the area - now known as Liaoning province, in north east China.
Ambopteryx was related to a similar dinosaur named Yi Qi - found by a farmer in China in 2007.
They were both theropod dinosaurs known as paraves such Archaeopteryx - dubbed 'the first bird' - and small clawed killers such as Velociraptor.
Remarkably, these also include the most famous predator of them all - T Rex.
Dr Wang said Ambopteryx reveals dinosaurs closely related to birds were experimenting with wing structures near the origins of flight.