Bolivia and Peru have signed a more than $500 million deal toward cleaning up Lake Titicaca, a Bolivian environmental official said, Agence France-Presse (AFP) reported Thursday. Pollution in the lake, which is the highest in the world at an altitude of 12,470 feet above sea level, has led to the near extinction of some animals.

The agreement was signed between Bolivia's Environment and Water Minister Alexandra Moreira and her Peruvian counterpart Manuel Pulgar during a public event.

"For the short term we have a limit of $117 million and for the long term $400 million," Moreira's advisor Sergio Arispe said, according to AFP. “It's a logistical matter we are trying to manage through 2025.”

Peru's minister reportedly said that the two countries are "already taking concrete actions such as investing in water treatment plants to address the main problems the lake is facing."

Lake Titicaca, which is the largest freshwater lake in South America, straddles the border between Bolivia and Peru, and most of the waste in the lake is generated by the Bolivian cities of El Alto and La Paz, located about 30 miles southeast of Titicaca.

More than 1 million people reportedly reside in the two cities resulting in pollution from urban and agricultural developments. According to some reports last year, climate change threatens to melt the glaciers that provide much of the lake’s water, combined with a shortened rainy season and intense solar radiation, resulting in a slow shrinking of the lake.