Climate change was one of the most contentious issues at the G20 gathering. (AFP)

After much wrangling, the Group of 20 major economies on Saturday agreed to disagree on fighting climate change, with the United States dissenting from a commitment to carry out the 2015 Paris climate change agreement.

In a communique at the end of a two-day summit in Japan's western city of Osaka, the grouping said "signatories to the Paris Agreement" reaffirmed their commitment to its full implementation, referring to the 19 members aside from the U.S.

The United States withdrew from the Paris pact because it "disadvantages American workers and taxpayers," the grouping added in a subsequent section, adopting a two-part approach used at last year's summit in Buenos Aires.

The division reflects tussles over global warming that have repeatedly stymied international forums since U.S. President Donald Trump pulled the United States out of the landmark accord to limit the effects of climate change.

Even before the summit started, the differences over climate change became apparent when President Emmanuel Macron said France would not accept a final text that omitted the Paris pact.

In that accord, 200 nations agreed to limit the global average rise from pre-industrial temperatures to below 2 degrees C (3.6 degrees F). Current policies put the world on track for a rise of at least 3 degrees C by the end of the century, the United Nations said in a 2016 report, however.

G20 officials said the negotiations to secure acceptable language on climate change were contentious.

The first chunk of text reflecting the majority view said members had "common but differentiated responsibilities and respective capabilities" in implementing the pact.

The section on the American stance said the United States employed a "balanced approach to energy and environment" to deliver "affordable, reliable, and secure energy to all its citizens".

The U.S. approach uses "all energy sources and technologies, including clean and advanced fossil fuels and technologies, renewables, and civil nuclear power, while also reducing emissions and promoting economic growth," it added.

The G20 did manage to agree on tackling plastic trash in the ocean. In the statement the grouping said it adopted an "Osaka Blue Ocean Vision" that aims to stamp out additional pollution by marine plastic litter by 2050.

There were no details of how the goal would be met, except that members would adopt "a comprehensive life-cycle approach" by improving waste management and finding innovative solutions while recognising the importance of plastics for society.