The largest carnivore that ever walked the planet – Tyrannosaurus rex – is more closely related to the modern chicken than it is to living reptiles such as the alligator or crocodile, a study of the dinosaur's fossilised protein has found.

Researchers analysed a tiny shred of 68-million-year-old protein taken from the leg of T. Rex and compared it to the same protein found in 21 modern species. They confirmed that the giant predator is closely related to chickens and ostriches, but only to a lesser extent to reptiles such as alligators and crocodiles, which were thought to be more closely related to dinosaurs than other living creatures.

It is the first time that scientists have been able to trace a relationship between dinosaurs and birds through molecular analysis of animal protein, although anatomical studies have already produced convincing evidence of a link between birds and dinosaurs.

Download the new Independent Premium app Sharing the full story, not just the headlines

"These results match predictions made from skeletal anatomy, providing the first molecular evidence for the evolutionary relationships of a non-avian dinosaur," said Chris Organ, a researcher in evolutionary biology at Harvard University in the US.

Proteins are composed of amino-acids arranged in a sequence that mirrors the order of chemical bases on molecules of DNA, so scientists can look at short strands of protein– called peptides – to investigate the relationships between species: alive or dead.

"Even though we only had six peptides – just 89 amino-acids – from T. rex, we were able to establish these relationships with a relatively high degree of support," Dr Organ said. "With more data, we would likely see the T. rex branch on the phylogenetic tree between alligators and chickens and ostriches, though we cannot resolve this position with currently available data."

John Asara and Lewis Cantley, of Harvard Medical School, were the first experts to capture and sequence pieces of collagen protein from T. rex. The samples were taken from the thigh bone of a T. rex unearthed in the "badlands" of Wyoming and Montana. "Most of the collagen sequence was obtained from protein and genome databases," Dr Asara said, "but we also needed to sequence some critical organisms, including modern alligator and modern ostrich.

"We determined that T. rex grouped with birds – ostrich and chicken – better than any other organism that we studied. We also showed that it groups better with birds than modern reptiles, such as alligators and green anole lizards."

The study, published in the latest edition of the journal Science, will add to the growing evidence that birds are descended directly from a group of dinosaurs that grew feathers, possibly as a form of thermal insulation, before they learnt to fly.

In China, scientists have found many examples of feathered dinosaurs, including several that may have used their wings to glide. One fossilised dinosaur had feathers growing in both pairs of limbs, suggesting that four-winged flight may have been possible among some species.