Public diplomacy is perception. Remarkably—and, unthinkably, as recently as one year ago—today China seems to be the world’s most likeable superpower.

Compare Donald Trump’s recent visit to Europe with that of Premier Li Keqiang, China’s second-in-command. Li, who landed in Berlin on Wednesday, hoped to use his three-day trip, with stops in Germany and Belgium, to “voice support for an open economy, free trade and investment [and] global regional peace and stability,” according to China’s state news wire Xinhua. Trump, on the other hand, failed to support NATO, decried Germany as “very bad” for its trade policies, and even seemingly pushed aside Montenegro’s prime minister to barrel his way to the front of a group photo. On Thursday, Li reaffirmed China’s support for the Paris Agreement, stating that there is an “international responsibility” to fight climate change. Later on Thursday, Trump announced the United States would exit the landmark climate-change treaty. In that speech, Trump reaffirmed his commitment to his “America First,” policy, while Li, in his meetings and speeches in Europe, successfully painted China as a liberal, responsible, globalist power.

Yet in this case, perception is not reality. China is an illiberal, authoritarian nation, run by the Communist Party for the last 68 years. The United States, for all its faults, is a far more natural partner for most of the world’s countries. It’s a stable, multiparty democracy with a healthy, developed system of alliances, decades of experience in global intervention, and a proud tradition of defending both human rights (in words, if not always in action) and free trade. China is none of these things. But because of Trump’s shambolic presidency, a series of disastrous foreign-policy decisions, and Beijing’s concerted push to peel away U.S. allies, it currently seems to be winning the global battle for hearts and minds.

China, over the last decade or so, has been prioritizing bilateral and multilateral relations, rather than alliances. Until the Trump presidency came along, that seemed like an obtuse strategy (though better than its decades-long isolationist foreign policy). Why would countries favor a subordinate relationship with Beijing when Washington granted them group security, international recognition, and favorable trade policies? In other words, how could countries like South Korea or Australia—or even, if current trends continue, Germany or France—possibly imagine that their relationships with Beijing, and not Washington, better served their interests?

Since last November, however, America and China’s respective strategies and realities have shifted. Some of Trump’s statements, like his inauguration address (“from this moment on, it’s going to be America first”) and actions have alienated American allies. And his four months of bungling foreign policy—from his rude and disastrous late-January call with Australia’s prime minister to his contentious Europe trip, to his abdication of global responsibility in exiting from the Paris Accords—have worried them.

The result, intentional or otherwise, is that allies and friendly nations have begun to at least think about the alternatives. Consider German Chancellor Angela Merkel’s response to Trump’s Europe trip. The continent should “take our fate into our own hands,” she said on Sunday, adding, “the times in which we could completely depend on others are on the way out.” After emphasizing that China “has become a a more important and strategic partner” in a meeting with Li on Thursday, she said “we are living in times of global uncertainty and see our responsibility to expand our partnership in all the different areas and to push for a world order based on law.” Merkel’s remarks not only indirectly rebuked Trump, but expressed a hope that China would shoulder some of the international responsibility America now seems to be yielding. Consider also the new president of South Korea’s surprisingly lukewarm messages towards Trump, and the debate in Australia about moving away from the United States. “Self-reliance and helping ourselves should be the keynote of our foreign policy,” Australia’s former Prime Minister Paul Keating said in April.

Beijing is providing frameworks for all these nations to plug into a Chinese world order. The most prominent is “One Belt, One Road,” Chinese President Xi Jinping’s signature trade initiative, which seeks to recreate the old Silk Road trading routes, with China once again at the center of the world’s economy. A May forum in Beijing on the initiative gathered Russian President Vladimir Putin, among other leaders, and officials from over three dozen countries, including the United States. China is also increasing its influence over existing frameworks like the United Nations, where it is now the second-largest contributor to the body’s peacekeeping budget, and even via the privately held World Economic Forum annual conference in Davos, Switzerland, this January, where Xi portrayed himself as the patron saint of globalization.

In some prominent cases, the choice by allied or friendly nations to distance themselves from the United States does not necessarily mean they are moving closer to China. Some, including Japan, India, and Germany, are also seeking to diversify their foreign policies. For example, in an endurance test of high-level diplomacy, Merkel managed to host Indian Prime Minister Narendra Modi between Trump and Li’s visits. And yet, this trend still benefits China, where many leading strategic thinkers fear that America’s alliances seek to contain China, similar to the U.S. Cold-War strategy towards the Soviet Union.

Beijing is not only accepting warmer greetings from nations that feel spurned by the United States; it is actively trying to coerce America’s allies to distance themselves from China to assert its power. The prime example is South Korea: After Seoul decided earlier this year to deploy the THAAD anti-missile system, which Beijing fears could shoot down Chinese missiles, but which primarily serve to curtail North Korean aggression, Beijing retaliated economically. It reduced tourism between the two nations, and some South Korean businesses have faced boycotts in China.

In Asia, “we’re seeing a region that’s equally afraid of being subject to Chinese retaliation as a region fleeing from Donald Trump,” Ely Ratner, a former deputy national security advisor to Joe Biden who’s now at the Council on Foreign Relations, told me. “I wouldn’t underestimate the former.”

Beijing wants South Korea to remove THAAD. But it doesn’t want Seoul as an ally. Why? Because the world’s second-largest economy, and a nation that may dominate the 21st century, has no allies. Chinese diplomats and scholars don’t even regard North Korea and Pakistan, two neighboring nations with which it has maintained historically warm relations, as allies. Part of this has to do with timing. “By the time China became a more prominent diplomatic player in the late 1990s and early 2000s, the countries who most desired it were a pretty unsavory bunch: Venezuela, Iran, Burma, Zimbabwe, Sudan,” Ratner said. That’s not to say China today is diplomatically isolated—far from it. Today, China has mostly shaken its reputation as a coddler of pariah states: Throughout the global financial crisis, Beijing seemed to realize it had more to gain by further integrating itself with the international order, leading to its expanding global influence.

Yes, several eventualities could reverse this trend. Trump’s presidency, like the lives of prehistoric men, could be nasty, brutish, but also short. A more engaged America could soothe the damage Trump wrought to American alliances. Xi could decide China needs to manage its domestic issues first, and retreat diplomatically. Or perhaps he could overextend, and alienate friendly countries with unreasonable demands. Beijing could face an economic crisis, or, scarier to the Communist Party, a political one, potentially relieving it of control of China, or forcing it to share power—all possibilities that would distract from the extension of China’s power.

In a June 2012 conversation, a high-ranking Chinese diplomat told me Beijing doesn’t believe in alliances. Rather, it sees relationships, including with the United States, in bilateral terms. The diplomat said two countries are like neighbors. As Beijing’s plants keeps growing—China now has legitimate political and economic interests and entanglements in almost every country in the world—Washington should recognize that new reality and gracefully yield, the diplomat told me.

Five years on, Trump is yielding—neither gracefully, nor altogether intentionally.