China and the U.S. vowed to work together to slow global warming, issuing a surprise joint statement Wednesday that injects new momentum into the last days of global climate negotiations. The deal also marks a rare moment of cooperation between superpowers locked in geopolitical rivalry and who seemed at odds for most of the two-week talks in Glasgow, Scotland.

The two sides agreed to boost their efforts to cut emissions, including by tackling methane and illegal deforestation, China’s special climate envoy Xie Zhenhua told reporters.  They will establish a working group to increase action in the 2020s — a key decade — which will meet in the first half of next year. His U.S. counterpart John Kerry said that the group will focus on “concrete” measures.

As the world’s two major economies, “we need to work actively to address climate change,” Xie said. Kerry said that “the U.S. and China have no shortage of differences, but on climate cooperation is the only way to get this job done.” The two spoke at separate press conferences, one after the other, with Xie going first. 

The announcement changed the mood in Glasgow, where negotiators are in the midst of fraught discussions over how to accelerate measures to curb the rise in global temperatures. It was a bilateral agreement between the U.S. and China that paved the way for the landmark Paris Agreement in 2015.

“The big significance of this is geopolitical,” said Nick Mabey, co-founder of think tank E3G. “The U.S. and China have signaled they will end the wars of words that marred the past days.”

The two countries reaffirmed the temperature goals of the Paris accord, which has a stretch target of limiting warming to 1.5 degrees Celsius, and recognized there is a gap between current policies and what needs to be done, Xie said. Both are committed to pushing for a successful COP26, including agreements on climate finance and rules to create a global carbon market, he said.

Still, China declined to join the global pledge being pushed by the U.S. and the European Union to cut methane emissions 30% by the end of the decade from 2020 levels. Xie said China will develop its own national plan. Kerry admitted that he had failed to get China to move its deadline for reaching peak emissions earlier from 2030. “We’ve peaked out on peaking,” he said. 

As the world’s biggest emitter of greenhouse gases, China can do more than any other country right now to help the world avoid the worst effects of global warming. But it argues that its plan to reach carbon neutrality by 2060 will already be the most ambitious emissions reduction ever attempted. 

The joint agreement comes ahead of a virtual summit likely to be held next week between Chinese President Xi Jinping — who skipped an in-person appearance at COP26 — and U.S. President Joe Biden. The leaders have held two phone calls alongside various lower-level meetings that the U.S. said were disappointing and lacked serious engagement from Chinese officials.

The aim of the meeting is likely to be simply putting a floor under tensions over everything from tech to trade, human rights and the status of Taiwan. Xi wrote in a letter this week to the National Committee on U.S.-China Relations that China is ready to deepen ties with the U.S. and better manage their disputes. 

Both leaders have an incentive to put the relationship on a more even footing as they each focus on challenges at home, and climate matters are one of the few areas they can cooperate on. But the longer-term trajectory is still toward a collision between the world’s two biggest economies as they jostle for both economic and strategic influence around the world.  

“It can only be good news that the U.S. and China are working closely on climate change and slashing methane emissions,” said Bernice Lee, research director at Chatham House. “But the statement is not enough to close the deal. The real test of Washington and Beijing is how hard they push for a 1.5°C-aligned deal here in Glasgow.”