Chinese President Xi Jinping on Wednesday told the secretary-general of the ruling Liberal Democratic Party that he will visit Japan in June to attend this year's summit of the Group of 20 major economies in Osaka.

Xi's pledge came during a meeting with LDP Secretary-General Toshihiro Nikai in Beijing. The trip would be Xi's first to Japan since he took power in 2013.

As a special envoy, Nikai gave Xi a letter from Prime Minister Shinzo Abe, who is also the head of the LDP. The party's No. 2 is visiting Beijing to attend this week's "One Belt, One Road" summit in the Chinese capital.

For years, the two neighbors had been mired in a territorial dispute over the Senkaku Islands in the East China Sea. The group of uninhabited islets, which are called Diaoyu in China, are controlled by Tokyo but claimed by Beijing.

But Sino-Japanese ties have been improving recently, with 2018 marking the 40th anniversary of the signing and entering into force of the bilateral Treaty of Peace and Friendship.

As Tokyo and Beijing have agreed to work together to facilitate reciprocal visits by their countries' leaders, Chinese Premier Li Keqiang visited Japan in May and Abe made a trip to China in October last year.