China's giant pandas need not only bamboo, but also ancient forests to thrive in the wild, a study in western China has found.

The Chinese researchers hunted for panda grounds in forests in Sichuan province and marked out 1,116 habitats after finding the animals' faeces and foraging sites.

They analysed common traits in these habitats and found that they were mostly located in forests that were at least 100 years old.

Previously, we thought slope was a very important factor, but from this study, forest age emerged as the most important reason, as important as the presence of bamboo, said Fuwen Wei, deputy director of the Institute of Zoology at the Chinese Academy of Sciences in Beijing.

Wei and colleagues, who published their findings in The Royal Society journal Biology on Wednesday, believe pandas use large trees as maternity dens.

Old forests offer many maternity dens which are necessary for panda reproduction. Where big trees are felled, there are no more maternity dens, Wei said in a telephone interview.

A 2004 census by the Worldwide Fund for Nature revealed there were 1,600 pandas in the wild.

Considered a national treasure, the panda is seen as having come back from the brink of extinction while remaining under threat from logging, agriculture and China's increasing human population.