Finance ministers from 20 world powers have failed to reach an agreement to endorse free trade and rejection of protectionism in the face of US opposition, according to the communique of the G20 participants.

The ministers and central bank chiefs of the G20 countries ended talks in the German town of Baden Baden on Saturday, making only a token reference for the need to strengthen the contribution of trade to the economy.

"This is not a good outcome of the meeting," a G20 delegate quoted Germany's central bank chief Jens Weidmann as saying. Germany has a $65bn trade surplus with the US.

Breaking with the bloc's decade-old tradition of rejecting protectionism and endorsing open trade marks a win for US President Donald Trump and his anti-globalisation agenda.

US Treasury Secretary Steven Mnuchin said on Thursday in Berlin that the Trump administration had no desire to get into trade wars but that certain trade relationships need to be re-examined to make them fairer for US workers.

'Fairer trade'

After a meeting with German Chancellor Angela Merkel on Friday, Trump said that he did not believe in isolationism but that trade policy should be fairer.

The G20 financial leaders on Saturday reaffirmed their commitment to refrain from competitive currency devaluation, a key agreement as the US has repeatedly complained that some of its trade partners are using artificially devalued currencies to gain a trade advantage.

G20 also walked back on a pledge to support climate change finance, an anticipated outcome after Trump called climate change a "hoax".

On Thursday, Mick Mulvaney, Trump's budget director, said climate change funding would be "a waste of money".