HANGZHOU, China — Setting aside their cyber and maritime disputes, President Obama and China’s President Xi Jinping on Saturday sealed their nations’ participation in last year’s Paris climate change agreement. They hailed their new era of climate cooperation as the best chance for saving the planet.

At a ceremony on the sidelines of a global economic summit, Obama and Xi, representing the world’s two biggest carbon emitters, delivered documents to U.N. Secretary-General Ban Ki-moon. The papers certified the U.S. and China have taken the steps to join the Paris accord that set nation-by-nation targets for cutting carbon emissions.

“This is not a fight that any one country, no matter how powerful, can take alone,” Obama said. “Some day we may see this as the moment that we finally decided to save our planet.”

Xi, speaking through a translator, said he hoped other countries would follow suit and advance new technologies to help them meet their targets.

The formal U.S.-Chinese announcement means the accord could enter force by the end of the year. Fifty-five nations must join for the agreement to take effect. The nations that have joined must also produce at least 55 percent of global emissions.

Together, the U.S. and China produce 38 percent of the world’s man-made carbon dioxide emissions.

The White House has attributed the accelerated pace to an unlikely partnership between Washington and Beijing. To build momentum for a deal, they set a 2030 deadline for China’s emissions to stop rising and announced their “shared conviction that climate change is one of the greatest threats facing humanity.” The U.S. has pledged to cut its emissions by at least 26 percent over the next 15 years, compared to 2005 levels.

The meeting of the minds on climate change, however, hasn’t smoothed the path for other areas of tension. The U.S. has criticized China over cyberhacking and human rights and voiced increased exasperation with Beijing’s growing assertiveness in key waterways in the region. Most recently, the U.S. has urged China to accept an international arbitration panel’s ruling that sided with the Philippines in a dispute over claims in the South China Sea.

The ceremony opened what is likely Obama’s valedictory tour in Asia. He stepped off Air Force One onto a red carpet, where an honor guard lined his path.

But the welcome didn’t go entirely smoothly. A Chinese official kept reporters and some top White House aides away from the president, prompting a U.S. official to intervene. The Chinese official then yelled: “This is our country. This is our airport.”

Throughout his tenure, Obama has sought to check China’s influence in Asia by shifting U.S. military resources and diplomatic attention from the Middle East. Results have been mixed.

The Trans-Pacific Partnership is stuck in Congress..Climate represents a more certain piece of his legacy.

Under the Paris Agreement, countries are required to set national targets for reducing greenhouse gas emissions. Those targets aren’t legally binding, but countries must report on their progress and update their targets every five years.

The state-run Xinhua News Agency reported that China’s legislature had voted to enter the agreement. In the U.S., no Senate ratification is required because the agreement is not considered a formal treaty.