Chinese President Xi Jinping could not have written a better script.
As China begins its 19th Communist Party Congress, with Xi set to be anointed to a second five-year term and cement his uncontested control, the Chinese leader is perfectly poised to look outward and exert global leadership.
He will be doing so precisely as the U.S. is turning inward, its politics appear increasingly dysfunctional, and a new administration, under its "America First" doctrine, is dramatically withdrawing from America's traditional world leadership role.
Xi can largely thank Donald Trump for his good fortune. The American president began his presidency by withdrawing the U.S. from the 12-nation Trans-Pacific Partnership trade pact. It was an accord largely of America's making that was aimed at drawing the region closer to the U.S. economically, while potentially luring China to liberalize its economy as the price of entry. With the TPP now languishing, Beijing is pushing to conclude a rival trade pact, the Regional Comprehensive Economic Partnership, or RCEP, by the end of this year.
Like the TPP, the rival pact will also comprise about 40% of the world economy. But the RCEP is dominated by China and India, and does not include any of the TPP's agreements on labor rights, environmental protections or intellectual property rights.
Trump also announced his intention to withdraw from the Paris Agreement on climate change, prompting global outrage. But China and the European Union immediately made their own announcement of a new Beijing-Brussels alliance to reduce global carbon emissions. China also recently announced plans to bolster the electric car industry, another sign it is taking the leadership in combatting greenhouse gases and investing in renewable energy.
The Trump administration also declared it was withdrawing from UNESCO, the United Nations' cultural organization, over what it said was the group's anti-Israel bias. China's foreign ministry replied: "China values the importance of UNESCO and would like to contribute more to the organization's cooperation." China is now the third largest financial contributor to UNESCO, just behind Japan, but will likely be the biggest once the American withdrawal is complete.
The same pattern followed with the Iranian nuclear deal, of which the U.S. and China are among the signatories. Trump indicated his readiness to withdraw from the deal, citing what he called Tehran's failure to live up to its terms. EU states have now said they would work more closely with China and Russia to make sure the agreement remains intact, regardless of what the U.S. does.
In all of these instances and more, China appears to be the outward-looking world power working seriously to sustain the multilateral system and uphold international agreements. The country going rogue, becoming insular, unilaterally disavowing signed international agreements and disrupting the established global order? The United States.
There are other, more subtle signs that China's Xi is become more outward looking as the U.S. withdraws.
Trump expresses mostly disdain or, at best, reluctance about America's international alliances. He views the world in transactional terms, and sees longstanding military allies like Germany and Japan as economic rivals taking advantage of America's largesse. His oft-repeated "America First" mantra is about making sure U.S. workers chiefly benefit from any overseas arrangements. Africa appears worse than an afterthought for Trump -- he has barely mentioned the continent, but is planning huge cuts in development aid and U.S. contributions to global peacekeeping forces, both of which would deeply impact Africa.
China, meanwhile, is stepping up its outside engagement, particularly in Africa. China in August opened its first ever overseas military base, in Djibouti on the Horn of Africa. China is already Africa's largest trading partner -- 15% of the continent's exports go to China -- and some estimated 10,000 Chinese firms in Africa are creating jobs for local workers. Xi has also pledged at the United Nations to increase China's role in African peacekeeping up to as many as 8,000 police and soldiers.
In Asia and beyond, China's Belt and Road initiative aims in part to recreate the old Silk Road trade route. There are plans for roads, pipelines, high speed rail and power plants; with $1 trillion invested so far the total cost already surpasses the Marshall Plan that rebuilt Europe after World War II, which was worth $132 billion in today's money.
On the domestic front, too, Xi and Trump could not be in more different positions.
Trump, in the first year of his first term, still appears to be struggling to master the machinery of government or command the loyalty of his own Republican party.
He languishes in opinion polls at around 40% approval or less and remains under the cloud of an expanding official investigation into Russian interference in the 2016 presidential election. Some pundits speculate, perhaps prematurely, whether Trump might even be forced out before the end of his first term.
Meanwhile, after this month's Party Congress, Xi is poised to be more fully in control of China than any leader since Deng Xiaoping, and perhaps since Mao Zedong. When he was first appointed to the top job in 2012, he was surrounded by members of the powerful Politburo Standing Committee who were not of his choosing, reflecting the delicate balancing act among China's factions.
Now almost all of those earlier appointees are set to retire, leaving just Xi and his premier Li in place -- and giving Xi the power to almost unilaterally name new members of the party Standing Committee.
After a ruthless anti-corruption campaign that purged many of his rivals, Xi seems to have a freer hand. Some analysts believe he may use his new power to begin long-stalled reforms of the economy, including breaking up some of the state-owned behemoths to allow more competition and moving to make the Chinese currency, the renminbi, more easily convertible.
But analysts trying to understand the black box of Chinese politics have been wrong before. It was also assumed that Xi's predecessor, Hu Jintao, would use his second term as president and party leader to institute reforms, once he was more firmly in place. That never happened.
China's foreign policy future seems easier to discern. And there, all the stars are aligning for Xi to emerge after this month's congress as arguably the most important leader on the global stage. He has the largest accumulation of foreign exchange. His country is increasingly seen as the engine of global growth. Presidents and prime ministers are looking to Beijing, not Washington, to support international agreements and institutions.
Many countries, particularly in Asia, remain understandably wary of China's ascendance. Despite Beijing pledging fealty to "peaceful development" and so-called "win-win" cooperation, it has demonstrated it can be militarily aggressive. It is particularly blunt when asserting its historical territorial claims, in the East China Sea against Japan, on its borders with India, and against rival claimants to islands in the South China Sea. There have been naval and air standoffs, which many fear might one day lead to an all-out confrontation.
Even when China is upholding the global consensus, it is typically doing so in combination with a ruthless promotion of its commercial interests and thirst for natural resources. China pushes to keep the Iran nuclear deal intact, partly because of Beijing's growing economic ties with Tehran. China has shown it is willing to trade, lend money and give aid without restrictions based on human rights -- one reason why an authoritarian country like Cambodia is now shifting firmly into China's orbit.
Still, this year could be year the predictions come true that China starts to dominate the 21st Century. Xi Jinping could not have planned it better if he tried. And he should wake up every day thanking Americans for electing Donald Trump.
Keith B. Richburg, a former foreign editor of The Washington Post, is director of the University of Hong Kong's Journalism and Media Studies Center.