Japan has decided to hold firm on its stance that it has no agreement with China preventing the prime minister and two other senior leaders from visiting the war-linked Yasukuni Shrine.

In a move that could further damage Prime Minister Shinzo Abe's chances of holding formal talks with Chinese President Xi Jinping, the Cabinet on Tuesday finalized a written response denying a 2005 claim by then-Chinese Ambassador to Japan Wang Yi that Japan agreed not to have its prime minister, foreign minister and chief Cabinet secretary visit the shrine.

Wang, now China's foreign minister, said in April 2005 that the two nations had concluded a "gentlemen's agreement" after Prime Minister Yasuhiro Nakasone paid an official visit to Yasukuni in 1985.

"Such an agreement does not exist," Abe's administration said in response to a written inquiry filed by Upper House member Kazuyuki Hamada, an independent.

Abe's December 2013 Yasukuni visit not only angered China and South Korea but also stoked disappointment in the United States, which had hoped Japan would work to improve frosty ties with its neighbors for the sake of security in the Asia-Pacific region.

The visit to the controversial shrine has hampered the planning of any formal meeting between Abe and Xi.