Once Japan became the leading investor in Asia, regional production chains began to link those countries with one another. As Korea, Hong Kong, Singapore and Taiwan moved up the technology and value chains, they invested in developing countries, like Vietnam and Indonesia. This process of regionalizing investment and production, which largely dispenses with Europe and America, has now been accelerated by China’s rise as a manufacturing power. The biggest investor in Vietnam today, for instance, is South Korea, whose biggest trading partner is China.

The success of China’s state-led economy presents, in many ways, the same economic (and ideological) quandary that Japan unexpectedly threw up before the United States when, in the 1980s, it became the world’s leading creditor. A regional trading system dominated by China will make Asian countries less likely to enlist in American geopolitical objectives. Locked into boundary disputes with its neighbors, China has accelerated the militarization of the South China Sea, acquiring more than 3,200 acres of land on reefs and outcrops and installing runways, ports and hangars. But it has also abandoned its abrasive attitude, making determined efforts to pivot Asia away from Trump’s America. And it seems to be succeeding.

With China offering generous infrastructure deals to the former American territory of the Philippines, President Rodrigo Duterte announced that “it is time to say goodbye” to the United States — previously he threatened to ride a jet ski to a Chinese man-made island in the South China Sea and plant his country’s flag there. Other rival claimants to parts of the South China Sea — Malaysia, Vietnam and Brunei — have also moved closer to Beijing since Trump’s election. Smaller countries like Cambodia and Laos now resemble Chinese client-states. China is also trying to repair long-strained relations with Japan by inviting investments by Japanese multinationals.

These attempts to win over major American allies in Asia complement Xi’s ambitious One Belt, One Road initiative, which aims to put China at the center of global affairs through a network of trade links and infrastructure projects stretching from Asia to the Middle East to Africa and Europe. Investing more than $1 trillion in more than 60 countries — ports in Pakistan and Sri Lanka, high-speed railways in East Africa, gas pipelines in Central Asia — the initiative can claim to be the largest overseas investment drive ever undertaken by a single country. The 11 European Union members and five non-E.U. Central and Eastern European countries that have joined the China-led political and commercial group called 16+1 have all signed major infrastructure deals with China, enhancing Beijing’s influence in the E.U. The remaining 11 members of the Trans-Pacific Partnership have gone ahead without the United States; they are expected to sign a final agreement in March.

By pulling out of the TPP and threatening trade sanctions, Trump encouraged Japan to seek a deal with Europe that shuts out the United States. Britain, another stalwart American ally, is considering joining the TPP. China, meanwhile, is hectically negotiating more than a dozen trade agreements in Asia while proposing its own alternative to the TPP, a trade agreement called the Regional Comprehensive Economic Partnership. China has also intensified efforts to build alternatives to such Western international institutions as the World Bank and the International Monetary Fund. In 2014, China inaugurated, against staunch American opposition, the Asian Infrastructure Investment Bank, whose members now include all Asian states except Japan.

There is little doubt that Beijing is presenting itself as a benign alternative to the United States. In a speech just before his second term as the party’s general secretary, Xi claimed that there were more takers internationally for Chinese “values.” China, he said, offers “a new option for other countries and nations who want to speed up their development while preserving their independence.”

It was always wildly optimistic to suppose that China would eventually be integrated into an American-dominated order and persuaded, if not forced, to adopt its norms. A postcolonial Indian like myself, who traveled to China and read in its modern history and literature over the last decade and half, could only be skeptical of such claims. It was never less than clear to me, whether in the suburbs of Lhasa, Tibet (demographically altered by Han immigration), or in the bookstores of Shanghai (stacked with best sellers with titles like “China Can Say No”), that the quest for national sovereignty and regained strength defines China’s party state and its economic policies.

Belying predictions of doom, China has again demonstrated the power of what Dower, speaking of Japan, called “national pride — acute, wounded, wedded to a profound sense of vulnerability.” The United States never knew this single-minded ambition of the historical loser to avenge his losses; American leaders now reckon with it at home, in the wake of a nationalistic backlash against free trade and globalization. Some confused policies and mixed signals have accordingly defined the American position on China. During the American presidential campaign in 2016, all the main candidates, Bernie Sanders and Hillary Clinton as well as Trump, opposed the TPP, which was intended to contain China in its own region. Then, in Trump’s chaotic first year, the United States seemed to be forced back by Hamilton’s shrewd East Asian disciples into its historical role as the mother country of protectionism. Trump now says that America first does not mean America alone, and he is open to rejoining the TPP. There may be more such reversals ahead. For Trump is only just beginning to acknowledge, after a year of bluster, the formidable challenge of China and the arduous effort needed for the United States to match its most determined and resourceful rival yet.