Six years ago the area around Samboja in Borneo was like much of the world's tropical rainforest: denuded. The trees had been cut for timber, the land burnt, and in place of what should be some of the richest biodiversity on the planet were thousands of acres of grass.

But from this ruined landscape a fresh forest has been grown, teeming with insects, birds and animals, and cooled by the return of moist clouds and rain. It is a feat that has been hailed by scientists and offers hope for disappearing and ruined rainforests around the world.

The secret was to use more than 1,300 species of local tree and a fertiliser made with cow urine, says Dr Willie Smits, the Indonesian forestry expert who led the replanting. 'The place became the scene of an ecological miracle, a fairytale come true,' says Smits, who has written a book about the project.

Rainforests are home to half the world's 10 million species of plants, animals and insects, store more carbon than the Earth's atmosphere, clean air and water and regulate temperatures and rains. But the UN estimates that every day more than 14,000 hectares (34,900 acres) of primary rainforest are cut down for timber or to make way for crops such as palm oil in south east Asia and soya in South America - a figure campaigners warn is 'conservative'.

The area around the small town of Samboja was like a 'moonscape' when Smits first visited it nearly a decade ago. The rainforest had been cut and burnt and was covered with grasses. Without the forest, the rains disappeared and temperatures rose: streams dried up, harvests failed, fires broke out, jobs disappeared and ill health soared.

'The only thing I saw was this huge sea of yellow, waving grass; there was wind, but there was no rustling of leaves,' Smits said. 'There were no birds, not even insects, nothing but this damned grass.'

Smits raised money to buy 5,000 acres and six years ago set about planting seeds collected from more than 1,300 species of tree, more even than would have lived in the original forest. These were planted with a special 'micro-biological agent' made from sugar, excrement, food waste and sawdust - and cow urine.

Planting finishes this year, but already Smits and his team from the Borneo Orang-utan Survival Foundation charity claim the forest is 'mature', with trees up to 35 metres high. Cloud cover has increased by 12 per cent, rainfall by a quarter, and temperatures have dropped 3-5C, helping people and wildlife to thrive, says Smits. Nine species of primate have also returned, including the threatened orang-utans. 'If you walk there now, 116 bird species have found a place to live, there are more than 30 types of mammal, insects are there. The whole system is coming to life. I knew what I was trying to do, but the force of nature has totally surprised me.'

People have also benefited from being given land around the forest to plant sugar and other crops, providing food and income. 'It was the poorest district in the area, now it's above average,' said Smits. 'It can be done anywhere. The principles are that you must have scientifically sound approaches, work with local trees, and you have to have the respect of local people - that's the key.'

· 'Thinkers of the Jungle - The Orang-utan Report' by Gerd Schuster, Willie Smits and Jay Ullal, is published by HF Ullmann, £29.99