The biggest UN summit on sustainable development in a decade has approved a strategy to haul more than a billion people out poverty and cure the sickness of the biosphere.
But critics branded the plan a cruel failure, saying it had been gutted of ambition by national interests.
The gathering of 191 UN members crowned a 10-day forum marking 20 years since the Rio Earth Summit, where leaders vowed the world would live within its environmental means.
In a sprawling 53-page statement, the three-day summit voiced dismay at entrenched poverty and mounting ecological stress.
"We... renew our commitment to sustainable development, and to ensure the promotion of an economically, socially and environmentally sustainable future for our planet and for present and future generations," it said.
Entitled "The Future We Want," the statement highlighted the many perils facing a planet whose human population is set to surge from seven billion today to 9.5 billion by 2050.
The long list includes climate change, desertification, fisheries depletion, pollution and deforestation, and the danger that thousands of species will go the way of the dodo.
"Sustainable Development Goals" will replace the UN's Millennium Development Goals from 2015, although defining the aim will be left for future talks -- a process likely to be long and fiercely fought.
The strategy also promotes the green economy, a concept that breaks new ground in official UN terminology yet is viewed suspiciously by many developing economies.
But the statement also reflected the worries of advanced economies battling a deep financial crisis.
Despite the demands of developing nations for $30 billion in help, the text stipulated no funding figures to achieve sustainability goals.
UN Secretary-General Ban Ki-moon said the outcome "provides a firm foundation for social, economic, environmental well-being."
"It will guide us, all of us, towards a sustainable path. It is now our responsibility to build on it."
President Dilma Rousseff told a press conference that Brazil, the host country, had secured the compromise after months of haggling.
"The consensus is a point of departure, not arrival," she cautioned.
"With this document, nations move forward. We cannot allow anyone to remain behind. The next conference will have to be a leap forward."
US Secretary of State Hillary Clinton said the document "marks a real advance for sustainable development. We know this is one of the most pressing matters of our time."
But others said a historic opportunity had been thrown away.
"The two defining challenges we face today are eradicating global poverty and managing the risks of climate change," said British economist Lord Nicholas Stern, author of a landmark study into the costs of global warming.
"But the conference has failed to acknowledge the compelling evidence about the scale and urgency of action required."
A registry that was opened during the conference showed that nearly 700 commitments, mobilizing $513 billion, had been made for sustainable development by governments and businesses, the UN said on Friday.
It gave no details about whether the funding was new or the criteria for determining whether the projects were sustainable.
In the green movement, many activists branded Rio+20 a disappointment to rank alongside the 2009 Copenhagen climate summit, a near-fiasco.
"Rio+20 has been a failure of epic proportions," said Greenpeace's executive director, Kumi Naidoo.
"We must now work together to form a movement to tackle the equity, ecology and economic crises being forced on our children. The only outcome of this summit is justifiable anger, an anger that we must turn into action."
Ban had named the Conference on Sustainable Development as the cornerstone of his plan for fairer, cleaner growth, the "No. 1 priority" of his tenure.
But talk of a summit that would draw as many 130 heads of state or government to give a push to his goals was way off the mark.
In the end, less than half of the UN's rollcall of countries sent their leader, with the remainder represented by deputies, ministers or simply chief negotiators.
Absentees included US President Barack Obama, Russian President Vladimir Putin, Chancellor Angela Merkel of Germany and British Prime Minister David Cameron.