Prime Minister Shinzo Abe has decided not to visit war-linked Yasukuni Shrine in Tokyo during its annual fall festival from Oct. 17 to 20, a government official said Friday.

Abe apparently wants to avoid worsening Japan's relations with China and South Korea at a time when he is trying to set up his first meetings with their leaders on the sidelines of the Asia-Pacific Economic Cooperation forum summit in Beijing in November.

The prime minister has been unable to hold summits with Chinese President Xi Jinping and South Korean President Park Geun-hye since returning to office in December 2012, amid tensions over territorial disputes and perceptions of wartime history.

Abe's visit last December to the Shinto facility, which honors Japanese leaders convicted as Class-A war criminals along with millions of war dead, not only angered China and South Korea but also disappointed the United States.

The United States wants Japan to improve relations with China and South Korea to ensure stability in East Asia.

Abe instead plans to again dedicate a "masakaki" tree offering as he did for Yasukuni's spring and fall festivals since his return to office, a move aimed at pleasing his conservative supporters to some extent.