President-elect Donald Trump faces immediate challenges: managing the war against ISIS, fixing ObamaCare and boosting growth to create jobs. But as the fallout from his recent conversation with the president of Taiwan indicates, an increasingly assertive China poses the most vexing and far-reaching challenges for American prosperity and security.

China has accomplished hyper growth supplying Western consumers with inexpensive goods and attracting Western investment to obtain necessary technology, but it has hardly played by the established rules and norms of global trade. It has subsidized exports, manipulated its currency and engaged in other abusive practices.

Trump has promised to slap a 45 percent tariff on Chinese imports to get a better deal through existing international agreements, echoing a strategy advocated by Mitt Romney.

The $320 billion annual deficit on trade in goods and services with China depresses demand for American-made products, curtails funding for U.S.-based R&D, kills millions of jobs and is a principal cause of the blight in communities like Reading, Pa., and Hickory, N.C.

President-elect Trump must prepare for a diplomatic and perhaps military showdown in the Pacific and to confront Beijing on the massive trade imbalance that finances Chinese mercantilism and adventurism.

Just as menacing are the trillions of dollars in cumulative trade surpluses China has amassed that are financing a dramatic pivot in its industrial, military and foreign policies, threatening security in the Pacific and America’s standing with allies around the globe.

As wages rise in Chinese coastal manufacturing centers, jobs move farther west in China and elsewhere in Southeast Asia, causing major social disruptions. For example, Dongguan, near Hong Kong, has endured job losses on a scale similar to large Midwestern cities in the U.S.

To buffer job losses and limit political unrest, Beijing is pursuing a two-pronged strategy.

It is imposing tougher restrictions on foreign investment, which further depresses the value of the yuan, ladles on more subsidies for basic manufacturing, tightens administration restrictions on imports and consolidates state-owned enterprises to enhance their monopoly power.

Simultaneously, it is encouraging more technology-intensive activities that strike at the heart of American and European competitiveness through lavish subsidies for startups, acquisitions of U.S. and European businesses and toughened regulation of American and other foreign technology companies operating in China. In the process, many products and components used by its basic assembly and fabrication operations, once sourced in the United States and western Europe, are now made in China.

Most of those tactics either violate World Trade Organization rules or are decidedly asymmetrical. For example, the United States, Germany and other European nations generally permit the Chinese to purchase companies outright, whereas Western investors generally must offer Chinese joint-venture partners a substantial stake when establishing subsidiaries in the Middle Kingdom.

While Chinese technology still lags behind Western capabilities in many complex and mundane areas, such as rice cookers, it has managed to leap ahead in some fields — for example, satellite technology for espionage-proof and encrypted communications.

In addition, the cash earned from its huge trade surpluses is financing a massive buildup in naval and air power, militarization of the South China Sea and about 20 port facilities the Chinese navy can access in Asia, Africa, the Middle East and Europe. It also has established an Asian International Development Bank, and the Chinese government and private investors are plowing billions of dollars into the economies in Asia and Africa through infrastructure projects and direct investment.

President Obama has been hesitant to take the advice of U.S. defense leaders in challenging China’s artificial islands and militarization of the vital South China Sea, and the combination of Chinese muscle and billions in new investment has encouraged the Philippines and Malaysia, longtime U.S. allies, to tilt toward Beijing.

The latter substantially undermines the U.S. strategy of resolving sovereignty disputes in the South China Sea and securing the sea lanes from Chinese control by relying on the recent U.N. tribunal ruling denying Beijing’s claims and through U.S. military and diplomatic cooperation with regional allies.

The South China Sea has huge seabed mineral deposits and is a vital passage for some $5 trillion of international shipping annually. Open access has been secured by the U.S. Navy in cooperation with regional allies since World War II, and the stability of that framework is vital — not merely to global commerce, but also to U.S. credibility with strategic allies in the Middle East and Europe.

President-elect Trump must prepare for a diplomatic and perhaps military showdown in the Pacific and to confront Beijing on the massive trade imbalance that finances Chinese mercantilism and adventurism.

American prosperity and security depend on it.