It was all toasts and effusions of mutual esteem when President Thein Sein welcomed Shinzo Abe to Myanmar's capital, Naypyidaw, on May 26. No Japanese prime minister had visited the country since 1977.

Both leaders looked determined to cement diplomatic and economic ties that had long been relatively good, even during the decades when the West shunned a brutal military regime. Abe, who also met Myanmar's opposition leader, Aung San Suu Kyi, promised "all possible assistance" to support the country's commitment to reform, which Thein Sein initiated in 2011.

Japanese deeds matched the fine words. Abe canceled Myanmar's $1.8 billion of debt and promised another $500 million in aid loans. This comes on top of Japanese commitments already agreed on over the past 18 months, including for a special economic zone at Thilawa, just south of Yangon, the commercial capital.

Japan is spending an initial $200 million on Thilawa, which will include a new port to replace Yangon's old one, now largely silted up. Dozens of Japanese executives also came with Abe to Myanmar, where he urged them to hunt for opportunities.

Myanmar is the region's most fashionable destination for investment, but other countries in Southeast Asia have benefited more from Japanese largesse of late. Since Abe came to office in December, his ministers have tripped over each other in Southeast Asian capitals, offering new investment, aid and more. Japan wants to perk up its own economy by dramatically increasing its presence in ASEAN, the 10-country Association of Southeast Asian Nations, a rare economic bright spot.

But the ministers' talk is not only about trade. Diplomatic alliances, naval training and even sales of defense equipment are also on the agenda. For ­hanging over the new Southeast Asian push is Japan's troubled relationship with China.

Anti-Japanese feelings grow in China

Chinese confrontation over Japan's control of the Senkaku or Diaoyu islands in the East China Sea has exacerbated differences between the two countries. Anti-Japanese sentiment in China has added to the concerns of Japanese businessmen about the long-term future of their investments there.

Last year a Reuters survey of Japanese manufacturers found that almost a quarter of those questioned were considering delaying or reversing investment plans in China. For Japan, Southeast Asia has fast become a diplomatic and economic hedge against China.

As part of a new financial pact with the region, Japan is investing in the government bonds of ASEAN members. Its finance ministry also will help Japanese companies borrow in local currencies. Some corporate giants are drawing together entire supply-chain clusters in Southeast Asia, usually centered on Thailand — Honda, for example, expects to build 424,000 cars a year there by 2015. For this, Japanese companies increasingly need local funds. Thailand's appalling floods in 2011, which closed car plants and many other Japanese manufacturers, have not fundamentally changed business plans; after all, insurance payouts minimized companies' losses.

In Indonesia, another country with long-standing economic links to Japan, Japanese companies recently won a $370 million contract to start building a new underground transit system in Jakarta. (The flood-prone capital is built atop a marsh, and is just the sort of challenge that Japanese engineers relish.)

But it is in other Southeast Asian countries with which it has traditionally had fewer ties that Japan is unusually active. In particular, it is forging new partnerships with Vietnam and the Philippines, both of which have their own maritime quarrels with China, over islands and reefs in the South China Sea.

In Vietnam the Japanese have been helping to bail out the country's stricken state banking sector. In December Tokyo-Mitsubishi UFJ announced that it was buying a 20 percent stake in ­VietinBank, for $743 million. Mizuho took a 15 percent stake in Vietcombank, for $567 million, in September 2011. Japanese commitments to Vietnam rose to $5.1 billion in 2012, double the figure for the previous year.