PM Modi arrives in Johannesburg on Wednesday for a three-day BRICS meeting to discuss US trade war.

Leaders of the BRICS emerging economies -- Brazil, Russia, India, China and South Africa -- gathered in Johannesburg on Wednesday for a three-day meeting focused on the threat of a US-led global trade war.

US President Donald Trump's hardening stance has compounded fears of an all-out trade war after he slapped levies on goods from China worth tens of billions of dollars and imposed tariffs on other international imports.

China's President Xi Jinping, Russian President Vladimir Putin, Indian Prime Minister Narendra Modi and Brazilian President Michel Temer will attend the annual summit, along with several African leaders invited as guests.

Xi held talks with South African President Cyril Ramaphosa on the eve of the gathering, saying that "the Johannesburg summit has special significance for BRICS cooperation in the new circumstances".

South African trade minister Rob Davies opened the event on Wednesday with a call to fight the "undermining the multilateral rules-based trading system which all of us consider to be an important part of the trade architecture."

China this week sharply rejected accusations by Donald Trump that it was manipulating the yuan to give its exporters an edge, saying Washington appeared determined to provoke a trade war.

Mr Trump has said he is ready to impose tariffs on all $500 billion of Chinese imports, complaining that China's trade surplus with the US is due to unfair currency manipulation.

The BRICS group, comprising more than 40 percent of the global population, represents some of the biggest emerging economies, but it has struggled to find a unified voice -- as well as achieving sharply different growth rates.

Trade war unity?

Analysts say US trade policy could give the group renewed unity.

Sreeram Chaulia, of the Jindal School of International Affairs outside Delhi, told AFP that BRICS leaders would "concur that the US has unleashed punitive trade wars that are hurting all the BRICS members".

"They have a collective interest in promoting intra-BRICS trade. The urgency this time is greater," he said.

Russian Economy Minister Maxim Oreshkin said last week the Johannesburg meeting was "about the context -- we are at a time when the US and China announce new measures almost every week".

"This is a trade war, so leaders' discussions are particularly important in coordinating our positions," he added.

Mr Xi arrived in South Africa after visiting Senegal and Rwanda as part of a whistlestop tour to cement relations with African allies.

Signalling diplomatic rivalry over influence in Africa, PM Modi visited Rwanda and Uganda on his own five-day tour of the continent including the BRICS summit.

The meeting opened on Wednesday with a business forum, before the heads of state hold talks on Thursday.

African leaders attending a "BRICS outreach" programme on Friday include Paul Kagame of Rwanda, Joao Lourenco of Angola, Macky Sall of Senegal and Yoweri Museveni of Uganda.

"South Africa, and Africa more broadly, can benefit from increasing exports to fast growing countries like India and China," Kenneth Creamer, an economist at Johannesburg's Wits University, told AFP.

"BRICS has the strategic potential to re-shape world trade."

Turkish leader Recep Tayyip Erdogan will also attend a summit as the current chair of the Organisation of Islamic Cooperation (OIC) and will meet Putin on the summit's sidelines.