Coffee drinkers around the world could be helping to save what is left of the threatened wildlife of El Salvador.

The original forests of the tiny Central American republic have virtually disappeared, but its high-altitude coffee plantations provide refuge for a surprising variety of birds, mammals, reptiles and amphibians.

Now environmental organisations are hoping that an eco-friendly coffee label will help to prevent the mountainous landscape from being stripped bare of its remaining habitats.

At Las Lajas, more than 120 tree species shade the precious "green coffee"

As well as the long civil war in the 1980s and the earthquake of 2001, El Salvador has been beset by serious environmental degradation which in the current dry season gives much of the country the appearance of a rocky desert.

Driving through the mountains west of the capital San Salvador, the bare hillsides converted to cattle pasture give way to what appears on first sight to be healthy forest cover.

On closer inspection, these areas turn out to be coffee plantations, using a method of cultivation which requires tall trees to provide shade for the coffee shrubs themselves.

Chris Wille of the Rainforest Alliance, a US-based non-government organisation, explains: "The country has lost all but about between 2% and 5% of its original native ecosystems, but a good healthy 10-15% is still forested with coffee.

"So it's coffee farms that are providing the last refuge for wildlife, that are protecting the watersheds, that are buffering and extending the few parks; and that are conserving the soils and importantly providing firewood to the rural population, 80% of which depends on firewood as their chief source of energy."

But coffee growing in El Salvador is under threat as the uncertain world price for the product makes many farms uneconomic.

Everywhere you go, signs advertise "lotificacion" - the sale of plots on abandoned coffee plantations which give way to housing or shopping malls close to the cities, and more destructive forms of agriculture such as cattle-grazing or open crops like maize or sugar cane.

The hope is that by certifying coffee growers who observe strict rules on environmental protection and working conditions for their employees, these businesses will be better able to compete in the volatile international marketplace.

'Green coffee'

At the Las Lajas co-operative near the town of Sonsonate, no fewer than 120 tree species shade the coffee which is fertilised with organic compost made from the husks of the coffee beans themselves.

One of the managers at the co-operative, German Javier Chavez, says that even with the relatively healthy world coffee price at the moment of just over $1 (£0.50) a pound (0.5kg), certification can add 10 cents to the value.

High-altitude coffee plantations provide refuge for a variety of birds

That difference is much greater when world prices fall because the "green" coffee holds its value.

"When the prices are really low like they were, and they may be again in the future, then certification can be a survival mechanism. It can really make the difference," Mr Chavez told the BBC News website.

The ecological importance of coffee cultivation can be seen in El Imposible National Park, one of the few strictly protected natural areas of forest in El Salvador.

Named for its inaccessibility, the spectacular park cut by steep river gorges is bordered by coffee plantations which link it to another park, Los Volcanes, about 50km (31 miles) away.

The Salvadoran group Salva Natura, which monitors the certification scheme in the country, is hoping to create a biological "corridor" to give the wildlife of the area a better chance for survival.

The executive director of the organisation, Juan Marco Alvarez Gallardo, said: "In between the two parks you have a lot of isolated patches of natural forest on the top part of volcanic peaks.

"Below that natural vegetation is this 'coffee park' as we call it, because the coffee shrub in these plantations and farms is covered by natural forests in the majority of cases. So you have an opportunity to connect biodiversity and improve gene flow between these parks."

'Way of the future'

On one of the plantations near the park, Salva Natura has set up a monitoring station where birds are trapped in a net before being logged and released unharmed.

When we arrived, the haul for the day included the spectacular blue-crowned motmot and a long-tailed manikin, a species normally found only in dense forest. In all, 120 species of bird have been observed on the farm.

At another co-operative, San Jose de la Majade, President Julio Antonio Martinez admits he was sceptical at first when approached by the environmental groups.

"I was one of the people that were against Rainforest Alliance because I didn't like somebody coming into my house and telling me what to do, what to plant or what not to plant.

"But I realise now that they were giving me good advice. They were telling me plant trees so you will get water - without trees you don't have rainfall, without rainfall you don't have coffee," he said.

There has been some criticism of the baffling array of certification labels faced by coffee consumers, ranging from organic and Fair Trade logos to the "sustainability" mark used by Rainforest Alliance.

But according to the groups running the El Salvador scheme, supported by wildlife organisations including Birdlife International, coffee consumers could play a crucial role in protecting nature and livelihoods for future generations.