Brazil and China will sign an agreement in the coming weeks to swap as much as $30 billion in their two currencies, Brazil Finance Minister Guido Mantega said.

The currency swap, worth 60 billion reais or 190 billion yuan, will be the first step in a broader agreement with Russia, India and South Africa to allow members of the so-called BRICS group of emerging markets to pool resources to better weather the global financial crisis, Mantega told reporters yesterday in Rio de Janeiro.

The agreement, which was discussed this week by leaders of the BRICS at a Group of 20 summit in Mexico, marks another step in a deepening trade between the world’s two largest emerging markets. China overtook the U.S. in recent years to become Brazil’s biggest trading partner, though Mantega said yesterday that the $76 billion in bilateral commerce last year, 17 percent of Brazil’s total, is…