Japan and China have largely agreed on how to implement a maritime and aerial communication mechanism aimed at averting unintended clashes in and above the East China Sea amid a long-running territorial dispute over the uninhabited Senkaku Islands, Japan's Foreign Ministry said Wednesday.

The mechanism, a sort of hotline between defense officials from the two countries, is expected to be put into practice in the near future after a decade of hard-fought negotiations.

Japan and China must still work out the details of the mechanism before reaching an official agreement.