Image copyright AFP Image caption Both mother and daughter were found traumatised and emaciated

A rare Borneo orangutan and her baby have been rescued from an attack by angry villagers in Indonesia as they were escaping rampant wildfires.

The malnourished mother and her youngster were found traumatised and hugging one another when they were saved by International Animal Rescue.

Frightened locals reportedly hurled rocks at them and tried to tie them up.

Media playback is unsupported on your device Media caption The orangutan and her baby were released back in to the wild after being attacked by villagers

Rescuers say the mother, who was extremely thin, had sustained wounds to the skin.

Primates escaping forest fires in Indonesia often head to villages in search of food, but many locals view them as pests - resulting in an increase in human-animal conflict.

Image copyright AFP Image caption The rescue team anesthetised both animals in West Kalimantan province so that they could be safely released to a protected area of forest for monitoring

Image copyright Getty Images Image caption Thousands of forest fires have engulfed Indonesia this year

The International Animal Rescue (IAR) team said that the two primates were rescued just in time. They say that the mother had just enough milk to nourish the baby.

She was also injured by a rope that had been tied around her wrist.

The rescue team anesthetised both animals in West Kalimantan province last month so that they could be safely released after medical tests to a protected area of forest for monitoring.

Many apes have been forced to flee their forest homes to escape thousands of forest fires that have engulfed the country this year.

Many of the fires were illegally started for land clearance purposes and have raged out of control in the dry weather conditions.

The UK-based IAR says that it has carried out more than 12 operations over the last two months to save orangutans that have strayed from their natural habitats.

Many Indonesian forests have for months been shrouded in thick haze caused by the fires, which in turn has contaminated air across neighbouring countries in south-east Asia.