BEIJING, China — There’s a new shade of blue in the Chinese palette: “APEC blue,” it’s called on social media to describe the beautiful color of the skies as residents of the Chinese capital gaze upwards. It’s very rarely seen. But during the just-ended Asia-Pacific Economic Cooperation summit, the government shut down factories, banned cars and drove people underground to the already overcrowded subway system. Schools closed, and government workers were banished for the week in hopes they’d vacation far from Beijing.

But nobody expects APEC blue to last, of course. The smog will return quickly as factories try to double their production to make up for lost time. It seemed a cynical ploy—and yet, it also showed just how self-conscious, embarrassed, and, yes, alarmed the Chinese government has become about environmental issues it previously seemed to push aside.

Such was the backdrop for a surprising, if not very specific, announcement by U.S. President Barack Obama and Chinese President Xi Jinping standing side by side after the conference closed. The leaders of the world’s two greatest polluters pledged to work in tandem to tackle climate change by reducing greenhouse gas emission over the next decade or so.

That may not signal the salvation of the planet, but it does show an inclination to find areas where they could make big agreements with potentially big consequences.

The news took many by surprise, but secret negotiations are said to have been taking place for at least nine months, and the accord opens the way nicely for next year’s worldwide climate treaty negotiations in Paris.

One might say (ahem) that in Beijing on Wednesday the atmospherics were everything.

When Barack Obama landed in the Chinese capital on Sunday for the start of the APEC summit, critics all around the world and many here in China had written him off as a lame duck president wobbling toward the exits. Yet as Obama headed for the ASEAN summit in Burma, his stature in the region appeared to be rising once again, and rather dramatically.

At the summit, Xi had been front and center, seemingly without peer. Today was the only time all week that Xi shared a platform with another world leader in Beijing on an equal footing. Prior to that, Chinese state media had designated Obama as just one of many world leaders who had arrived in Beijing to see Xi.

But climate change is a big deal. China knows how critical America is in this fight, and that joint effort is crucial. It also matters greatly to Xi that he doesn’t become the fall guy in all this, portrayed as a global villain. And Xi knows that while Obama will be out of the picture in two years’ time, Xi has another eight years left in office. He won’t be able to dodge responsibility for global disaster. Communist officials—including Prime Minister Li Keqiang—have repeated and explicitly described pollution and smog as one the the biggest threats to the country’s social stability.

Describing the initiative as “historic,” Obama said, ”This is a major milestone in the U.S.-China relationship. It shows what's possible when we work together on an urgent global challenge.”

Echoing those sentiments, Xi told reporters in Beijing’s Great Hall of the People, "We agreed to make sure that international climate change negotiations will reach an agreement in Paris.”

Currently, China and the United States are responsible for producing 45 percent of the world’s carbon dioxide. President Obama’s pledge will result in the United States reducing emission levels by from 26 to 28 percent below 2005 levels by the year 2025. This is up from a previous target of cutting emissions by 17 percent by 2020.

More importantly, China—the world’s biggest polluter—says it expects its greenhouse gas emissions to have peaked by the end of the next decade, perhaps earlier, paving the way for more green energy production and related technologies to fuel its economy.

Although no specific deadlines have been set by Xi, it is the first time that China has made such a pledge towards tackling climate change, an issue which dominates urban lives lived under what usually are coal-gray skies in this vast country.

The joint-announcement should also put to bed long-term disagreements between Beijing and Washington over emission targets.

Environmental groups have largely welcomed the news, although they stress the importance of concrete action rather than vague targets. Back in the U.S., the Republicans already have criticized the deal and are spoiling for a fight, with Senate Minority Leader Mitch McConnell saying these “unrealistic” plans will result in higher utility costs for the consumer. The White House argues that most of the mechanisms already are in place to ensure these goals are carried out.

The crux of the problem remains on this side of the Pacific. As the Chinese people become wealthier and expect better living standards, Xi’s leadership in reducing greenhouse gas will be crucial to his long-term legacy. But meeting any emissions pledges will be extremely difficult.

In the past year alone, two deals for relatively clean burning natural gas from Russia have been signed, guaranteeing supplies for decades to dome. But China’s addiction to coal means the impact on the environment from that very dirty fuel will be felt for some time yet.

Xu Qinduo, a long-time Beijing-based political observer tells the Daily Beast, “China’s economy is slowing down—growth may only hit 7 percent in 2015— so that means investing in green technology will be critical. But it’s important to note that while the Russian gas deals will help, it’s certainly not enough to replace coal as our chief source of energy.”

Xu also foresees a growing disparity between the megacities, Beijing and Shanghai, and the rest of the country over the next decade. “Gas supplies will likely be secured first for these first-tier cities and the smog will then clear. That would placate a large chunk of public dissatisfaction. But the second-, third- and fourth-tier and below, they’ll still be using coal for years to come.”

Nobody’s pretending the problem will solve itself, or be solved by the market. Even Xi chimed in on the debate the other day by saying that the blue in ‘APEC blue’ should remain permanent. Unlike Obama in the United States, Xi actually has the power to make that happen in China, if that is really what he wants to do.