Slideshow ( 3 images )

TOKYO (Reuters) - Japan and China, whose relations have been soured by disputes dating back to World War Two, hailed warming ties on Wednesday after agreeing to set up a security hotline to defuse possible maritime incidents that could spark tensions.

After meeting Japanese Prime Minister Shinzo Abe, Chinese Premier Li Keqiang told journalists that better relations between Asia’s two biggest economies were contributing to global stability and development.

Abe said he wanted to establish the sort of relationship in which the leaders could easily visit each other and said earlier in the day that he plans to visit China this year.

Diplomatic relations between the two nations have improved in recent years after deteriorating sharply in 2012, when Tokyo nationalized a cluster of disputed East China Sea islets that China also claims.

China’s relations with Japan have also long been poisoned by what Beijing sees as Tokyo’s failure to atone for its occupation of parts of China before and during World War Two.

In a public ceremony after their meeting, Abe and Li oversaw the signing of a pact to set up a hotline for senior defense officials to communicate during incidents involving each others’ naval vessels or military aircraft. [nL3N1SF46I]

The meeting came after a three-way summit between Abe, Li and South Korean President Moon Jae-in earlier in the day, the first such three-way gathering in two and a half years.

The top-level meetings come as tension over North Korea’s development of nuclear weapons eases ahead of what would be a historic meeting between North Korean leader Kim Jong Un and U.S. President Donald Trump.