Germany is investing €582 million (£413m) to help tackle climate change in Brazil.
The loan will be used to boost renewables in the country and decarbonise its economy.
German Chancellor Angela Merkel and Brazilian leader Dilma Rousseff announced the deal ahead of the COP21 in Paris later this year.
Germany is said to be one of the largest investors in Brazil.
The German Government claims the volume of trade with the country exceeded €20 billion (£14.2m) in 2013.
Ms Rousseff said: “We agreed on common actions to deal with one of the most important challenges of the 21st century.”