That China is rising hardly counts as news. For years now, Beijing has been steadily expanding its economic and military power. Yet for most of that time, Chinese leaders deliberately downplayed their growing clout, preferring instead to try to avoid engaging in great-power politics while focusing on domestic development.

That strategy is over. When visiting Beijing this week in the wake of President Trump’s visit and the 19th Chinese Communist Party Congress, I encountered a country with a sense of confidence and pride — swagger even. China is no longer rising. It has arrived.

President Xi Jinping has made clear his ambitions for superpower status. “China’s international standing has risen as never before,” he declared bluntly at the Party Congress. “Our Party, our country, our people, our forces, and our nation have changed in ways without precedent.” He referred to his country as “great” or “strong” over two dozen times, a radical departure from previous Chinese leaders.

Trump’s policies of isolation — pulling the United States out of the Trans-Pacific Partnership and the Paris agreement, and threatening to renege on the Iranian nuclear deal — have only served to bolster China’s new great-power image. At the APEC Summit in Vietnam, with Trump in attendance, Xi grandly announced that China plans to play a greater leadership role in the liberal world order. In keeping with that goal, he praised open economies and the benefits of shared development. As Trump pulls back from the international system, Xi is pledging to step up.

During his visit to Beijing, Trump compounded the sense of America’s diminished role by effusively referring to Xi as “a very special man” for whom he has an “incredibly warm” feeling. Trump said nothing about freedom or democracy and avoided meeting with nongovernmental leaders or students. The president’s defenders claimed that the president was deploying a sophisticated charm offensive to compel Xi to help on North Korea. Time will tell if his personal diplomacy worked. What I heard from many elites in China, however, was that they saw Trump’s statements (and lack of statements) as offers of respect, tribute and concession to a new great power.

As Xi celebrates China’s new global status, he and other leaders in the world should guard against accepting a premature verdict of American decline.

First, American power remains robust. Aside from area and population size, the United States is still the most powerful country in the world by every other metric, including aggregate GDP, per capita GDP, demographic renewal, most valuable companies, military size and spending, number of allies, top universities or number of patents.

Second, Xi should remember that there is nothing absolute about power relationships. Chinese power is certainly rising, but so too is American power, albeit at a slower rate. In aggregate power, China will close the gap but may never eclipse the United States. Remember those economists in the 1960s who forecast that the Soviet Union would overtake America in the 1980s, or commentators in the 1970s predicting Japan would surpass the United States in the 1990s? Those forecasts look silly today.

Xi’s embrace of liberalism abroad — “open development” — contrasts with the lack of Chinese openness at home. My inability to access my Gmail, Twitter, and Facebook accounts this week was a stark reminder of these contradictions. Unless China’s leaders can implement deeper economic and political liberal reforms at home, their country’s fantastic growth over the last three decades may eventually stall.

Third, Trump’s isolationist proclivities certainly impact U.S. foreign policy — but he is not acting in a vacuum. Already Congress, policy elites, and public opinion have all acted to check some of Trump’s insular instincts. Our allies also get a vote, and have usefully pushed the new administration toward greater engagement in the world. And the next election may replace Trump, allowing for the possibility that the next American president will once again embrace American leadership in the liberal world order.

It is too early to say if our current moment of isolation is a brief aberration or a more permanent development. But past cycles of American retrenchment have been followed by domestic renewal and global engagement, suggesting it is too soon to bet against America just yet.

A strong America re-engaged in the world need not impede China’s global ambitions, but could help to facilitate them — just as it could support the many other countries seeking to benefit from “open development.” Maintaining the liberal world order in the 21st century is sure to prove a major undertaking. Rather than replacing the United States as the leader of the liberal world, Xi may want some help.