LONDON, July 8 (Reuters) - The U.S. has agreed to forgive $35 million of Indonesian debt over the next nine years, the U.S. Treasury said on Monday, in return for the Southeast Asian country restoring and preserving coral reefs in what experts estimate is the world's most biodiverse patch of ocean.

Coral reefs are under increasing threat globally, due largely to climate change which is raising sea temperatures. Data in May showed nearly two-thirds have been subjected over the past year to heat stress bad enough to trigger "bleaching", which can wipe them out.

The agreement is the fourth "debt-for-nature" swap the two countries have struck since 2009 and is expected to fund at least 15 years of conservation work in two key areas of what is known as the 'Coral Triangle'.

The Bird's Head Seascape and Lesser Sunda-Banda Seascape it targets both span hundreds of thousands of hectares, a habitat for over three quarters of all coral species and more than 3,000 types of fish, turtles, sharks, whales and dolphins.

Indonesia has roughly 5.1 million hectares of coral reefs, 18% of the world's total according to the country's tourism ministry, but this year's bleaching problems have already had a devastating impact.

"These two regions are both at the epicentre of biodiversity," said Alexandre Portnoi, a legal advisor with Conservation International who helped organise the deal.

Indonesia benefitted from earlier debt swaps with the U.S. in 2009, 2011 and 2014 that collectively over time generated nearly $70 million. This is the first to focus on coral reefs rather than Indonesia's rainforests, which are imperiled by expanding palm oil plantations.

Reefs are harder to conserve at a national level because they are primarily threatened by planet-warming global greenhouse gas emissions from fossil fuels combustion, something Indonesia alone cannot tackle.

The agreement, signed last week and announced Monday, still hopes to make a difference.

It will see $26 million of Jakarta's debt written off under the U.S. Tropical Forest and Coral Reef Conservation Act. Conservation International will contribute $3 million and another $1.5 million will come from The Nature Conservancy, another group heavily involved in debt swaps.

Indonesia will commit to reef restoration while local non-profit groups will use conservation fund money to support projects that directly benefit reef ecosystems as well as sustainable livelihoods for those that rely on them.

"It is pretty simple," Portnoi said, explaining that debt for nature swaps were specifically designed to "break the cycle" of debt strains contributing to environmental degradation. (Additional reporting by Gloria Dickie Editing by Christina Fincher and David Gregorio)