By Antoni Slodkowski
TOKYO (Reuters) - Japan's Prime Minister Shinzo Abe heads to Russia on Friday in a show of support for President Vladimir Putin at the Sochi Olympics, just hours after headlining a rally demanding that Moscow return islands seized from Japan.
Abe's trip to attend the Games and hold his fifth summit with Putin since taking office 13 months ago, despite the seven-decade territorial dispute, stands in marked contrast to Japan's sharply deteriorating ties with China and South Korea, involving spats over tiny uninhabited islands.
For Putin, the appearance of G7 leader Abe at Friday's opening ceremony provides a high-profile seal of approval. The Russian leader faces global criticism over the country's human rights record and a recent law against gay "propaganda," which opponents say curtails the rights of homosexuals.
U.S. President Barack Obama, French President Francois Hollande, British Prime Minister David Cameron and German President Joachim Gauck are not attending the Games. The U.S. delegation includes three openly gay representatives.
Russia's domestic policies have not provoked controversy in Japan, but Abe's trip comes against the backdrop of the territorial dispute. He leaves immediately after addressing an annual "Northern Territories Day" gathering, meant to pressure Russia into returning the islands, which Russia says comprise the southern end of its Kurile chain.
Moscow took the islands east of Hokkaido days before Japan surrendered in World War Two, forcing 17,000 Japanese to leave. The often acrimonious dispute has kept the two countries from signing a peace treaty.
After last year's rally, two Russian fighter jets briefly entered Japan's airspace near the islands, prompting Japan to scramble its combat fighters.
But Abe and Putin - said to be on a first-name basis - have not let the dispute block progress in diplomacy centering on natural gas and other resources.
By contrast, the leaders of China and Korea have rebuffed Abe's repeated calls to meet. Besides the isle spats, Abe angered Beijing and Seoul with a December pilgrimage to a shrine they see as a symbol of Tokyo's past militarism.
Russia, too, criticized the shrine visit, but did not let it derail ties with Japan.
Abe's Sochi trip is "a manifestation that country-to-country relations are moving in a good direction," said former prime minister Yoshiro Mori, who has longstanding ties with Russia and has done much of the legwork for Abe's bilateral diplomacy. Mori told reporters the two sides are trying to arrange for Putin to visit Japan in the autumn.
Abe has made ties with Russia a priority, starting with a first-in-a-decade Moscow summit. Talks are to continue this year, although neither side expects a swift end to the dispute.
"Through our personal relationship of trust, we will make progress on cooperation in such areas as security and economics and engage in negotiations in earnest towards the conclusion of a peace treaty," Abe told parliament recently.
Russia's Foreign Minister Sergei Lavrov welcomed the opening of the talks in Moscow last month but stressed that recognition of the outcome of the war would be vital.
Moscow wants to bolster its position in East Asia as it warily watches the growth of China's influence in the region.
"Putin, for his part, just like Obama, is shifting towards East Asia," said Nobuo Shimotomai, professor at Hosei University in Tokyo. "He aims to do that by playing Russia's soft-power trump card, that is by selling energy to the region's countries," he said.
Russia's energy sector is undergoing a dramatic transformation, with oil flows being redirected to Asia via the East Siberia-Pacific Ocean pipeline. The country plans to at least double oil and gas flows to Asia over the next 20 years, part of a pivot away from export routes to Europe.
This presents an opportunity for Japan, which has been forced to import huge amounts of fossil fuel to replace its entire nuclear power industry, shut down after the 2011 earthquake and tsunami wrecked the Fukushima plant.
Japan now consumes a third of global liquefied natural gas shipments, a key reason for its record 18 months of trade deficits.
Russian gas lies on Japan's doorstep and already makes up about a tenth of its LNG imports. That could rise as Tokyo is desperate to diversify and slash costs of energy imports.
(Editing by William Mallard and Clarence Fernandez)