Another Paraguayan demand that the sides be allowed to sell to third countries will be readdressed in 2023.

Currently, energy from the dam can only be traded between the two countries, with Paraguay selling 95 per cent of the energy produced to Brazil.

Political gains

The deal gives Paraguay's Lugo some much need political capital.

The former Roman Catholic bishop, elected last August, has seen his first year as president marked by a severe economic downturn and scandals over revelations he fathered children during his time as a bishop.

Inacio Lula da Silva, Brazil's president, speaking at a ceremony at the Paraguayan presidential palace alongside Lugo,  called the deal "historic".

He described the agreement as part of a Brazilian campaign to help boost economic growth in the region and pledged to fund several major infrastructure project in Paraguay through bank loans.

"Bigger countries have an obligation to help countries with smaller economies in order to boost their development, initiative and competitiveness capacity," Lula said.

Another $450m would go toward financing a transmission line 350km long from the dam to Asuncion, Paraguay's capital, to enable more widespread distribution of energy throughout the country at lower costs, he said.