The fund will be used primarily to build a railway link that runs from Brazil’s Atlantic coast to the Pacific coast of Peru. Money will also go towards the production of steel, investments in car parts, and energy, ports, hydroelectric power and railways.

Why? Soy, oil and iron ore are top of the list of products China imports from Brazil, making it China’s biggest trade partner. The link will allow Brazilian ore and soya to be shipped from Pacific ports in Peru to Asia, bypassing the Panama Canal.

China is also looking for ways to use its high production of steel and railways – one way to do this is to build railways overseas. Chinese-built railway projects have also been proposed for Thailand, Indonesia and central Asia.

The two countries have strong economic ties, but their relationship isn’t always smooth. There were demonstrations in Brazil as far back as 2013 when China bought the country’s largest oil field.

Brazil also hasn’t been able to capitalise on the trade partnership as profitably as China has, raising fears that it is becoming an economic colony.

But the deal does mark another milestone in China’s involvement in the Brazilian economy. Brazil has has foundered over the Petrobras scandal, in which suppliers were allegedly bribed to overcharge the state-run oil company, Petrobras, for contracts, and passed on the money to former executives and politicians.

Back in January, Chinese President Xi Jinping pledged $250bn in investment to Latin America over 10 years.