Rich and poor countries agreed on Thursday to overhaul global finance for development, unlocking money for an ambitious agenda to end extreme poverty, protect the environment and improve economic opportunity by 2030.

The United Nations announced the deal on its website, capping three days of tough negotiations in Addis Ababa on how to finance the new Sustainable Development Goals that world leaders are due to adopt in September.

"This agreement is a critical step forward in building a sustainable future for all," U.N. Secretary General Ban Ki-moon said on the website.