When President Trump signed an order Jan. 23, 2017, rescinding U.S. participation in the Trans-Pacific Partnership free-trade agreement, he may have handed China a coup. Kevin Lamarque/Reuters

Though Donald Trump spent much of the presidential election campaign accusing China of trying to undermine the U.S. economy and ticked off Beijing by accepting a phone call from Taiwan’s president, he may have handed the People’s Republic a major diplomatic coup Monday when he canceled U.S. participation in the Trans-Pacific Partnership.

The 12-nation treaty, which excluded China, would have established a free-trade zone from Japan to Peru, encompassing 40 percent of the world’s economy, cutting tariffs and setting rules for trade disputes, the environment and intellectual property.

Australian Prime Minister Malcolm Turnbull said Tuesday he would try to salvage the TPP without the U.S., maybe even inviting China to join the accord.

"We are all of us working to see how we can ensure we maintain this momentum toward open markets and free trade," Turnbull told reporters in Sydney. "Losing the United States from the TPP is a big loss — there is no question about that — but we are not about to walk away from our commitment to Australian jobs."

Japan, which has the world’s third largest economy behind China and the U.S., however, is less open to the possibility of salvaging the agreement.

“Without the U.S., the TPP pact is meaningless as Prime Minister Shinzo Abe has clearly said,” Koichi Hagiuda, deputy chief cabinet secretary, told a regular news conference at the Prime Minister’s Office. “The fundamental balance of interests is lost without the U.S.”

China supports a free-trade zone in the Asia-Pacific region and has been trying to expand its influence westward.

Former President Barack Obama saw the TPP as a key to expanding U.S. influence in the region, the crowning touch to his Asia pivot. Trump’s action, however, is likely to diminish U.S. influence, allowing China an opportunity to move into the vacuum.

“If you are an [Asian] economy facing slower growth, where do you go? China seems to be the only one in the game,” Malcolm Cook, a senior fellow at the ISEAS-Yusof Ishak Institute in Singapore, told the Los Angeles Times.

Trump has made clear he does not like free-trade agreements, which he blames for gutting U.S. manufacturing. In addition to canceling the TPP, he also has pledged to renegotiate the North American Free Trade Agreement with Mexico and Canada.

Trump embraced protectionism in his inaugural address. In contrast, Chinese President Xi Jinping advocated for free trade in his keynote address at the World Economic Forum in Davos, Switzerland, last week, saying no one “will emerge a winner in a trade war.”

Free trade long has been a Republican cause and Trump’s action puts him at odds with his party. He’s finding support, however, on the left. Sen. Bernie Sanders, I-Vt., said he would be willing to work with Trump on trade issues if “President Trump is serious about a new policy to help American workers.”

Sen. Tammy Baldwin, D-Wis., tweeted approval of the TPP withdrawal but noted it’s only a first step in improving the lot of workers.

Former U.S. Trade Representative Michael Froman said recently China would be “all too happy” to fill the void created by U.S. rejection of the TPP, leaving “our closest military allies and partners no choice but to line up behind China.”

“China is actually now in a great position to assume a leadership role as the leading proponent for regional integration in the region,” Davin Chor, an associate professor in the Department of Economics at the National University of Singapore, told the Washington Post. “I do foresee the Chinese being more vocal and active in advocating for regional trade agreements centered around the Chinese economy.”