Washington: US President Donald Trump has accused China of "vicious" tactics on trade as he prepared for tough negotiations with European leaders in an escalating trade battle among world powers.

Trump tweeted that China was specifically targeting US farmers with retaliatory tariffs because "they know I love & respect" them. His defence came after his administration announced a plan to provide $12 billion in emergency relief for farmers who have been slammed by the president's trade disputes with China and other countries.

Addressing the China trade relationship, Trump wrote on Twitter, "They are being vicious in what will be their failed attempt. We were being nice - until now!"

It came after Chinese President Xi Jinping said at a summit in South Africa that the world faces "a choice between cooperation and confrontation", in remarks that criticised escalating US tariffs on goods from China and other major trading partners. He warned that those who pursue "economic hegemony" will "only end up hurting themselves".