Beijing and Tokyo will hold their first security talks in four years in the Japanese capital later this month, the Foreign Ministry said on Thursday, the latest sign of a possible improvement in ties strained by a territorial dispute.

Relations between the world's second- and third-largest economies have been damaged by conflicting claims to a group of tiny East China Sea islands and the legacy of Japan's wartime occupation of its larger Asian neighbor.

Patrol ships and fighter jets from both countries have shadowed each other regularly near the uninhabited islands that are controlled by Japan, prompting fears that an accidental collision could escalate into conflict.

The security meeting, to be held on March 19, will involve top officials from the two countries' foreign and defense ministries, the Foreign Ministry said in a statement. The last such meeting was in January 2011 in Beijing.

Prime Minister Shinzo Abe and Chinese President Xi Jinping met for the first time in November, on the sidelines of an Asia Pacific Economic Cooperation forum, in a step forward toward repairing their ties.

The same month, Japanese Foreign Minister Fumio Kishida and his Chinese counterpart, Wang Yi, agreed to resume the security talks that began in 1993.