The handover of power in Taiwan on May 20 will mark the dawn of a new era in Japan-Taiwan relations and, with it, a change in the dynamics of North-east Asian geopolitics in Tokyo's favour, analysts have said.
Even before Taiwanese President-elect Tsai Ing-wen led her pro-independence Democratic Progressive Party to victory in the January presidential and legislative polls, reported rumours of a chance meeting between her and Japanese Prime Minister Shinzo Abe when she visited Tokyo last autumn had set the tone for close bilateral ties.
"While both sides have dismissed the rumours, the shadow play skilfully portrays the impression of two leaders keen to take their relationship to a deeper level," said Professor Yasuhiro Matsuda, who specialises in China-Taiwan relations at the University of Tokyo, at a recent talk on the new Taiwanese government at the Foreign Correspondents' Club of Japan. And Mr Abe has made no secret of his affinity for the incoming Tsai administration.
For the first time since 1972, when Japan forsook Taiwan in favour of diplomatic recognition of communist China, the Japanese government has shown open and enthusiastic approval of Taiwan's political developments, noted Associate Professor Sachiko Hirakawa, a Sino-Japanese relations expert from Waseda University, in an interview with The Straits Times.
Despite a complicated legacy of Japanese colonialism in Taiwan and the absence of diplomatic relations, the two sides have maintained strong unofficial ties.
Mr Abe lauded Ms Tsai's win as a testament to the "freedom and democracy of Taiwan". The Japanese government also issued an official statement from the foreign minister congratulating Ms Tsai.
Prof Hirakawa calls this "a calculated strategic move to show China the strong ties with a liberal Taiwan, against the backdrop of China's recent increasingly expansionist territorial overtures".
The hope is that Ms Tsai's closer ties with Japan will mean her distancing from China, including in the rival territorial claims of China and Japan over the Senkaku/Diaoyu islands, say analysts. The outgoing government of the China-friendly President Ma Ying-jeou had irked Tokyo by joining the fray and asserting Taiwan's own sovereignty over the disputed islands.
At the same time, Japan hopes that China will turn its attention towards Taiwan and away from the Senkaku/Diaoyu flashpoint, as cross-strait ties are likely to be more fraught with a pro-independence government in Taiwan.
While Taiwan also claims the Senkaku/Diaoyu isles, its focus is not so much on territorial control - unlike China's - as on protecting the rights of fishermen in the surrounding waters, said Ms Naoko Mizutani, a Chuo University lecturer who studied in Taiwan.
"Negotiations over fishermen's rights will continue. In this respect, the Senkaku issue between Japan and Taiwan is different from how it affects Japan-China relations," Ms Mizutani told The Straits Times.
In the Taiwan Strait, Japan is likely to play a bigger role, given a less reliable United States deterrence coupled with Japan's new proactive defence policy, say analysts. Last year, the nationalist Abe administration pushed through a new security law allowing its forces to engage in more proactive operations abroad, especially to defend Japan's energy supply lifeline - through the South China Sea and Taiwan Strait - on which Taiwan lies.
A Taiwan that is friendly towards Japan would be reassuring to Tokyo in the face of China's increasing assertiveness in both the East and South China seas.
As for Taiwan, with its economy stagnating at close to zero growth, Ms Tsai's priority will be economic - in particular, formalising current trade ties with Japan in the form of a free trade agreement (FTA).
"Ma concluded an FTA with China, and Tsai will want to conclude one with Japan to have something to show for her term in office," Prof Matsuda told The Straits Times.
"Up till now, Japan has been cautious about negative reactions from China in its dealings with Taiwan, but the very close people-to-people ties will make it difficult to oppose closer cooperation between the two sides just because China opposes it," said Prof Matsuda.
He calls the two sides "earthquake buddies" - each sure to help out the other in the event of a major earthquake, laying the foundation for a strong sense of camaraderie between the two peoples. After the March 2011 Tohoku earthquake and tsunami, Taiwan donated the most funds from outside Japan.
The two sides are also closely linked economically, being each other's key trading partners. People-to-people exchanges are also strong, with Japan the most favoured destination for Taiwanese travellers last year, according to the Taiwan Tourism Board.
Apart from boosting trade ties, an FTA with Japan will also be an important stepping stone for Taiwan towards realising its ambition of participation in the 12-nation Trans-Pacific Partnership (TPP). Ms Tsai has made known her aim for Taiwan to take part in the TPP, which includes the United States, Japan and Singapore but excludes China.
Still, both sides need to calibrate their ties carefully lest they upset the triangular balance with China.
"Japan-Taiwan relations are likely to take a leap forward, but if they tread on China's toes, then the whole China-Taiwan-Japan house of cards will crumble," said Prof Hirakawa.