China’s party congress in Beijing will likely take place under crisp, blue skies — a symbol of President Xi Jinping’s environmental stewardship that is being tested by darkening economic clouds and political strife around the world.

More than any other leader of the Chinese Communist Party, Xi has sought to make the environment part of his lasting legacy. He’s dramatically cut the air pollution that plagued urban residents when he took over in 2012, overseen the development of a world-leading clean energy industry, and made perhaps the most important climate commitment in history in 2020 when he set a target for net-zero emissions within four decades.

Now, as Xi prepares to begin a landmark third term, his vision of green mountains and blue waters is threatened by a stagnant economy and an increasingly fraught global landscape for energy supply. Beijing’s blue skies around showcase events like the congress — or the Olympics earlier this year — are testament to the juggling act he faces. In order to reduce pollution the government has to sacrifice economic output, this week ordering nearby steel mills to slow production in what’s typically their peak season for demand.