MANILA - Japanese Prime Minister Shinzo Abe has arrived in the Philippines for a two-day trip aimed at shoring up ties with its mercurial new leader and boosting Tokyo's economic foothold in the face of anticipated competition from China.

The visit by Abe, bearing a 1 trillion yen ($8.77 billion) aid package, is the first by a head of state to the Philippines under President Rodrigo Duterte and comes amid a changing geopolitical landscape, much to do with a dramatic foreign-policy shift by the firebrand leader in Manila.

Duterte has been hostile towards traditional ally the United States while reaching out towards historic adversary China, putting Japan in an uneasy spot given its warm ties with Washington and rivalry with Beijing.

Abe described being the first leader to visit Duterte as a "tremendous honour".

"I chose the Philippines as my first destination this year and that is testament to my primary emphasis on our bilateral relationship," he said.

Abe's arrival comes as China seeks to capitalise on Duterte's openness to its investment in areas that include infrastructure, where Japanese firms have long been important players in Southeast Asia.

Japan is one of the biggest investors in the Philippines, mainly in electronics, financial services and auto manufacturing, through firms that include Toyota, Mitsubishi and Canon.

Representatives of 24 Japanese companies, among them major corporations, will join Abe in Duterte's native Davao City on Friday for a meeting with Philippine companies. Abe will visit Duterte's Davao family home.

Japan's aid package covers a five-year period and includes official development assistance and private sector investment, focusing largely on power and infrastructure. Japan is the biggest source of ODA for the Philippines.

Approximately $20 billion was provided over the past 50 years, according to Japanese Foreign Press Secretary Yasuhisa Kawamura.

Other agreements included agriculture cooperation and Japanese support in rehabilitation from drugs, a priority issue for a president running a deadly anti-narcotics crackdown that has been condemned internationally.

The deals also included delivery of pre-agreed fast boats, 12 altogether, for maritime security and counter-terrorism.

Duterte made no direct mention of troubles in the disputed South China Sea, referring to the two countries' shared interest in keeping waters secure from "threats of any kind".

He said new defence assets from Japan and upgrading of equipment would be the "centrepiece of this collaboration".

Abe said the South China Sea was central to regional peace and stability and welcomed Duterte's moves to engage with China in the wake of an international arbitration case Manila won last year.