Metro Manila (CNN Philippines) — Although the Philippines and Japan were bitter enemies during the Second World War, both of them have forged close ties in modern times.

Over the years, this has extended to maritime security. On Thursday, both countries signed a Memorandum of Cooperation between the Philippine Coast Guard and the Japanese Coast Guard.

The deal aims to enhance maritime cooperation to promote maritime safety, security, and marine environment protection.

On the first day of Japanese Prime Minister Shinzo Abe's official visit, his government committed a grant of 600 million yen (around ₱259.8 million) for high-speed boats and other counter-terrorism equipment for the Philippine Coast Guard.

According to defense analyst Jose Custodio, Japan sees the Philippines as a partner not only in terms of economics, but in also in terms of security.

"I think both countries want to build a strong relationship with each other. Japan sees the Philippines as an important cog in the entire network not just in economics but now emerging in terms of security also because we also know that Japan has problem with China in matters of territorial dispute," he told CNN Philippines' "Network News" on Thursday.

Custodio said Japan specifically aims to build up the Philippines' maritime capability.

"The Japanese are very much interested in building up our capabilities… to make us more capable in dealing with issues and concerns in the maritime domain," he said.

However, he pointed out these may be limited to monitoring capabilities, such as radar and coast guard vessels.

"These are better than what the Philippines has. These are large ships that are capable of going toe-to-toe with the Chinese in the South China Sea area," he added.

During a joint press conference with President Rodrigo Duterte at Malacañang, Abe said the South China Sea issue "is linked directly to regional peace and stability and is a concern to the entire international community."

"I welcome the fact that President Duterte is making efforts to improve China-Philippine relations in light of the arbitral award," he said.

For his part, Duterte said the Philippines and Japan — as maritime nations — share an interest in keeping their waters "safe and secure from threats of any kind." However, Duterte made no mention of the South China Sea issue.

He said capacity-building and assets acquisition and upgrading will be a centerpiece of the collaboration.