A United Nations biodiversity conference, after two weeks of intense talks, has reached a historic accord to protect the world's forests, coral reefs and other threatened ecosystems from destruction.

Meeting in Nagoya, Japan, representatives from 193 nations agreed to a 20-point plan to protect 17% of the world's land areas and 10% of oceans by 2020, reports the Associated Press. Currently only 13% of land and 1% of oceans are protected.

Overcoming divisions between rich and poor countries that threatened to derail an accord, they also agreed to share access to genetic resources such as plants whose extracts have been developed into medicines. Brazil, home to Amazon's vast resources, insisted upon this provision.

Follow Green House on Twitter

"At a certain point in the evening, it looked like it was all going to fall apart, so this is good news," Nathalie Rey, an oceans policy adviser with Greenpeace International, told the AP. "I would've liked to have seen more ambitious targets, especially on protected areas. But an agreement is better than no agreement."

"This agreement comes at a critical time as the pressures on the environment are growing fast and the responses have been too weak. It is especially timely in light of the U.N. climate talks in Cancun coming up in a month," Russ Mittermeier, president of Conservation International, said in a statement.