Zoologists have uncovered the secret of how koalas cool off in a heatwave - hugging trees, the trunks of which can be several degrees cooler than the surroundings.

Unable to sweat, koalas use panting as a way of evaporative cooling, but in the wild, they rarely drink and when they need to, water is often scarce.

As tree-dwellers, koalas do not generally seek out cool, shadowy ground surfaces like many other animals. 

Keen to unlock the marsupials' secret, a team of zoologists observed 37 koalas in the wild during winter and summer seasons in southeastern Australia in 2009 and 2010-11.

On hotter days, they found, the animals were more frequently positioned with all their limbs outstretched so they appeared to be hugging the tree trunk or lower branches.

The warmer it got, the lower the marsupials were found in the trees, and more often in trees other than eucalyptus, their food source.

This could be explained by the eucalyptus being only about 1.46C-1.87C cooler than air temperature, compared to about 5C for the acacia.

Based on their observations of tree temperature and koala behaviour, the team concluded the animals lose "substantial" body heat to tree trunks in hot weather.

"Water savings from this behaviour could be critical for the survival of this species during heatwaves when water availability is limited," said the study, published in the Royal Society journal Biology Letters.

"Our results highlight the important role of tree trunks as above-ground 'heat sinks', providing cool local micro-environments not only for koalas, but also for all tree-dwelling species."

While not endangered, experts say the fuzzy, grey marsupials are on the decline due to spreading human settlement.