The first human ancestors were squirrel-like creatures that lived in trees, analysis of their ankle bones reveals.

Purgatorius lived after the dinosaurs went extinct. It is the earliest primate fossil ever discovered, dating to 65 million years ago.

The fossils were recovered from sites in northeastern Montana and previous research focusing on their jaws and teeth showed they lived on a diet of fruit and insects. They are thought to weigh about 1.3oz and had big bushy tails.

Now, scientists have concluded the small mammal lived in trees and was not land-dwelling as had been suggested.

Stephen Chester, Brooklyn College, City University of New York, first said Purgatorius lived in trees three years ago while working at Yale University.

He unveiled his findings at the Society of Vertebrate Palaeontology's 72nd Annual Meeting. Speaking to Discovery News at the time, he said the ankle joint is mobile like those seen in tree-dwelling primates today. This mobility would have allowed them rotate their feet to adjust to different angles of trunks and branches.

Publishing his latest findings in the journal Proceedings of the National Academy of Sciences, Chester says the study findings provide evidence that Purgatorius did not live on land. Some researchers had said primitive plesiadapiforms (an extinct group of primates that Purgatorius was part of) lived on land, with later primates making the transition into trees.

"The textbook that I am currently using in my biological anthropology courses still has an illustration of Purgatorius walking on the ground. Hopefully this study will change what students are learning about earliest primate evolution and will place Purgatorius in the trees where it rightfully belongs," Chester said.

"The ankle bones have diagnostic features for mobility that are only present in those of primates and their close relatives today. These unique features would have allowed an animal such as Purgatorius to rotate and adjust its feet accordingly to grab branches while moving through trees.

"In contrast, ground-dwelling mammals lack these features and are better suited for propelling themselves forward in a more restricted, fore-and-aft motion."

The findings suggest that tree-dwelling played an important role in the evolution of primates.

Jonathan Bloch, of the Florida Museum of Natural History, told Discovery: "These new fossils support the idea that the first 10 million years of primate evolution happened in the context of an intense period of similar diversification in flowering plants, including the ability to climb in branches and collect fruits and other products of the trees at the very beginning."