China and the United States have ratified the Paris deal to cut climate-warming emissions, marking a major step toward the enactment of the pact as early as the end of the year and setting the stage for other countries to follow suit.

The world's two biggest emitters of greenhouse gases made the landmark announcement as heads of state from the Group of 20 biggest economies, or G20, arrived for a summit in the city of Hangzhou which starts tomorrow.

It is US President Barack Obama's last scheduled trip to Asia before leaving office.

China has gone to great lengths to try to make this weekend’s G20 summit a success, hoping to cement its standing as a global power, but a range of thorny diplomatic topics could overshadow the agenda.

G20 leaders are likely to renew their promises to use tax and spending policies to invigorate the sluggish world economy, although a new pro-growth push was unlikely.

When President Obama met Chinese President Xi Jinping, he told him they would have candid talks on cyber, human rights and maritime issues.

Nevertheless, the climate deal set a positive tone.

"Just as I believe the Paris agreement will ultimately prove to be a turning point for our planet, I believe that history will judge today's efforts as pivotal," Mr Obama said after he and Chinese President Xi Jinping handed ratified documents to UN Secretary-General Ban Ki-moon.

"We have a saying in America that you need to put your money where your mouth is.

"And when it comes to combating climate change, that's what we're doing. Both the United States and China, we're leading by example."

At a joint ceremony, Mr Xi said it "speaks to the shared ambition and resolve of China and the United States in addressing global issues".

A committee of the Chinese parliament approved the deal ahead of the summit. 

The G20 nations are responsible for about 80% of global carbon emissions.

Nearly 200 countries agreed in Paris in December on a binding global compact to slash greenhouse gas emissions and keep global temperature increases to "well below" 2°C.

Experts have said the temperature target is already in danger of being breached, with the UN weather agency saying that 2016 is on course to be the warmest since records began, overtaking last year.

While 180 countries have now signed the agreement, including Ireland, 55 nations - covering at least 55% of global emissions - need to formally ratify the treaty to put it into legal effect.

Before China and the US, 23 of the 55 nations had ratified it - including North Korea - but they collectively accounted for just 1.08 percent of global emissions, according to the UN Framework Convention on Climate Change.

China is responsible for just over 20% of global emissions while the US covers another 17.9% Russia accounts for 7.5%, with India pushing out 4.1%.

Countries that ratify the deal will have to wait for three years after it has gone into legal force before they can begin the process of withdrawing from it, according to the Paris agreement.