The captain and crew of a Chinese fishing boat detained for allegedly fishing in Japan’s maritime zone was released on Sunday, Chinese state media said, amid a simmering territorial dispute in the waters.

The skipper and his crew were released and sailed for China on Sunday after the Chinese consulate general in Fukuoka submitted a bail guarantee, Xinhua News Agency quoted the consulate general as saying.

Japanese coastguard had halted the boat in waters some 45 kilometers (28 miles) northeast of Miyako island in the southern Okinawan chain and arrested all 13 crew members on suspicion of unauthorized fishing in Japan’s exclusive economic zone on Saturday.

The arrest came as the two countries attempt to diffuse tensions in the waters from spilling over into a military conflict.

Last week, a Japanese senior envoy met with Chinese Communist Party chief Xi Jinping to discuss a possible summit between the leaders of the two neighbors.

Tokyo had scrambled fighter jets to the area after a lone Chinese aircraft flew over the islands in violation of Japan’s airspace. Prime Minister Shinzo Abe is considering deploying an airwing near the Senkaku Islands to defend the territory against further “provocations”, AFP reports.