Image caption Beijing has been trying to push the yuan as an alternative global reserve currency

China and Brazil have signed a currency swap deal, designed to safeguard against future global financial crises.

The pact, first announced last year, will allow their central banks to swap local currencies worth up to 190bn yuan or 60bn reais ($30bn; £20bn).

Officials said this will ensure smooth bilateral trade, regardless of global financial conditions.

Along with being the world's second-largest economy, China is also Brazil's biggest trading partner.

"If there were shocks to the global financial market, with credit running short, we'd have credit from our biggest international partner, so there would be no interruption of trade," said Guido Mantega, Brazil's economy minister.

The agreement was signed on the sidelines of the fifth Brics (Brazil, Russia, India, China and South Africa) summit being held in Durban, South Africa.

The purpose of this swap is that, independent of the conditions prevailing in the international financial market, we will have $30bn available Alexandre Tombini, Governor, Brazil Central Bank

'Guarantee normal trade'

Trade between China and Brazil has grown robustly over the past few years, with volumes rising from $6.7bn in 2003 to nearly $75bn in 2012.

A large chunk of this growth has been driven by growing Chinese demand for Brazil's resources, such as iron ore and soy products.

Meanwhile, Brazil has also become a key export market for goods manufactured in China.

Brazil's Central Bank governor Alexandre Tombini said the swap agreement would ensure that trade volumes between the two nations did not suffer if a financial crisis in the future hurt global liquidity.

"The purpose of this swap is that, independent of the conditions prevailing in the international financial market, we will have $30bn available which would represent eight months of exports from Brazil to China and 10 months of imports to Brazil from China," he said.

"This is sufficiently large to guarantee normal trade operations."

Bigger yuan role

China has been pushing for a more international role for its currency, the yuan. It has been trying to promote the yuan as an alternative to the US dollar as a global reserve currency.

As part of that push, it has signed a series of swap deals with some of its key trading partners.

Such agreements not only allow central banks to swap currencies, but can also be used by firms to settle trade in local currencies rather than in US dollars, as happens now, since China's currency is not fully convertible to other currencies.

Earlier this year, the Bank of England said that it was in negotiations with its Chinese counterpart to finalise a three-year swap agreement.

Last year, China signed a swap deal with Australia worth up to A$30bn ($31bn; £20bn) to promote bi-lateral trade and investment.

It is also looking at currency pacts with Hong Kong and Japan.