Tokyo: Japanese Prime Minister Shinzo Abe today met with Indonesian President Joko Widodo to forge tighter economic and defence ties, as Tokyo works to court friends in the face of a rising China.

The two nations agreed to tighter cooperation on coastal security, regular talks between their respective defence and foreign ministers, and greater Japanese investment in Indonesia.

"We wish to contribute to the peace and prosperity of this region and the international community by strengthening our strategic partnership with Indonesia, which, like Japan, is a maritime nation and democracy," Abe told Widodo as they began their talks.

Widodo's visit to Tokyo is a part of his week-long tour of Japan and China, aimed at attracting investment and forging closer political ties.

The visit came as Abe actively courts Southeast Asian nations to join Japan to create a counterweight to China, which is locked in territorial disputes with Japan in the East China Sea and with Vietnam and the Philippines in the South China Sea.

Widodo has previously told Japanese media that China's claim to virtually all of the South China Sea has no legal foundation.

Indonesia "is ready to play a role of mediator" between Tokyo and Beijing, Widodo told NHK before his trip.

Roughly 1,500 Japanese firms are operating in Indonesia, and Tokyo is Jakarta's top aid donor. Indonesia, by contrast, counts Japan as the number one destination for its exports, particularly its energy sales.

During his stay, Widodo, who took office in October, will also meet with Japanese business leaders, including executives from Toyota, the world's biggest automaker that has major operations in Indonesia.

Ahead of his visit, the Indonesian leader told Japanese media that he was interested in Japan's assistance to build key infrastructure, such as power plants, highways, and railways.