Japan’s Mizuho Securities just launched an investment fund with India’s Tata group. Mitsubishi Corp is betting big on Chennai real estate.

SoftBank Group is leading a $1 billion binge on hotels around the second-most populous nation. And the Japan International Cooperation Agency is betting big on bullet trains in Asia’s No. 3 economy.

Prime Minister Shinzo Abe, meantime, is stepping up the charm offensive with Indian counterpart Narendra Modi. Signs are, too, that Abe’s recent election win raised the odds Tokyo’s pivot away from China to India won’t just continue – but deepen.

Make that Southeast Asia, too. Though China gets the headlines, Japan is again dominating infrastructure investment in Indonesia, Malaysia, the Philippines, Singapore, Thailand and Vietnam. Abe’s Japan is quietly making inroads against Xi Jinping’s “Belt and Road” and Asian Infrastructure Investment Bank initiatives.

What’s driving Tokyo to look beyond China? It is not only Donald Trump’s trade war.

Reasons not to invest in China

Granted, Japan Inc has been eyeing alternatives to China, its main trading partner, in recent years. But rarely more intensely than after Trump’s shock election win in 2016.

Nationalism is part of it. Abe came to office in 2012 looking to remind China’s Xi who’s boss in Asia. In 2013, he punctuated the point with a pilgrimage to the controversial Yasakuni Shrine, which neighbors see as a symbol of Japan’s wartime aggression. Abe visiting a site enshrining the spirits of 14 “Class A” war criminals, including General Hideki Tojo, enraged Beijing.

The 2015 crash in Shanghai stocks gave Abe’s government even greater impetus to place fewer eggs in the proverbial Chinese basket. Worries about a Chinese reckoning added to concerns about Beijing’s unfair trade practices – such as giant subsidies for state-owned enterprises, currency manipulation, forced joint ventures and weak protection for intellectual property rights.

Tokyo also recoiled at how Xi’s government retaliated against Seoul for hosting a US anti-missile system known as Terminal High Altitude Area Defense, or THAAD. Abe’s team was aghast as Beijing canceled tour groups to Jeju Island and Busan, deprived K-pop stars of visas and ginned up boycotts of Hyundai car lots and Lotte department stores.

Even so, more recently, Trump’s trade assault on China has shaken Japan Inc to its core.

Trade war scares Japan

First, the “America First” leader pulled out of the Trans-Pacific Partnership, an insurance policy against Chinese commercial domination. Next came tariffs on steel (25%) and aluminum (15%) and levies on $250 billion of Chinese imports.

Adding to Tokyo’s anxieties: threats of a 25% tax on cars and auto parts, which would devastate the supply chains on which Japan Inc relies.

The big concern is that Trump’s tariffs distract Xi from the need to recalibrate China’s growth model. The more debt, credit and unproductive stimulus Beijing throws at the economy, the more Beijing’s bubbles grow. And the less that is being done to modernize an unbalanced economy.

Amid the chaos and uncertainty, Abe’s government signed a giant trade deal with the European Union. It spearheaded efforts to keep the TPP a going concern after Trump stepped away. Abe has become more vocal about preserving the free flow of goods and capital.

Recent moves have “marked the Japanese prime minister’s emergence as the world’s foremost advocate for and defender of the global trading system,” says analyst Tobias Harris of Teneo Intelligence. “Japan,” Abe said before the UN General Assembly recently, “has now taken on the mission of imparting to the world the benefits of trade.”

Ironies abound, of course. Not least of which is a Trumpian worldview stuck in the 1980s, when Japan was the economic nemesis that China is today. Another: for all the companies looking to diversify away from China, there are others encouraged by Xi’s “Made in China 2025” project.

Industrial products makers Yaskawa Electric, robot maker Fanuc, instant-noodle maker Nissin Foods and others are hedging their bets.

Shifting investment opportunities

Yet the Trump effect’s biggest impact has been in the other direction. Some CEOs are even re-shoring, bringing manufacturing operations back to Japan. Chemical giant Asahi Kasei, for example, is moving production of a US-bound plastic materials plant to Japan from China. Machine maker Komatsu is recalibrating certain business lines away from China to the US, Japan and Mexico.

But Japan’s increasing discovery of India could prove especially impactful for both economies. Abe and Modi, for example, have been coordinating on frameworks like the so-called quadrilateral dialogue, or QUAD, that groups Pacific democracies Australia, India, Japan and the US. Ditto for the “Indo-Pacific” enterprise.

Part of Japan’s interest lies in Modi’s “Make in India” scheme, which marries together two particularly lucrative markets for Tokyo: massive infrastructure needs and New Delhi’s big manufacturing ambitions.

In recent years, Abe has worked to create a “quality infrastructure investment” niche. Tokyo’s sales pitch amounts to” “China will help you build cheap roads, bridges, ports, power grids and high-speed rail, but at a cost. That cost is runaway debt and fealty to Beijing. Japan, by contrast, will build things to last and with fewer strings attached.”

As India’s physical hardware improves, Japan can then rely on the nation’s young and cost-effective workforce at the same time that Chinese labor costs surge. The same goes for Southeast Asia, where young workforces contrast wildly with Japan’s fast-aging and shrinking labor pool.

At the moment, Tokyo sees Southeast Asian infrastructure as particularly intriguing. Indonesia alone has some 250 giant projects in the pipeline, while the Philippines has about $180 billion in immediate building needs.

The real prize for Japan, though, is having alternatives to a China that is getting trumped by Washington – and fast.