Vanuatu's parliament elected Sato Kilman as the nation's new prime minister after a court upheld a vote of no-confidence in the nation's former leader and amid China-US rivalry in Pacific Islands.
Kilman, a former prime minister and leader of the People's Progressive Party, was elected prime minister 27/23 in a secret ballot by MPs.
Vanuatu was plunged into political crisis last month when opposition parties lodged a no-confidence petition criticising then leader Ishmael Kalsakau Kalsakau for actions including signing a security pact with Australia.
Opposition MPs said the security pact with Australia compromised Vanuatu's "neutral" status and could jeopardise development assistance from China, its biggest external creditor.
A Vanuatu court on Monday dismissed an appeal against a ruling that the no-confidence motion had been won by the opposition parties.
Vanuatu has been at the centre of a strategic rivalry between China and Western countries in the region. The United States and its allies are seeking to dissuade Pacific Islands nations from establishing security ties with China, after it signed a security pact with the Solomon Islands.
A police commissioner before entering politics, Kilman served as deputy prime minister in Kalsakau's government until May, when he was removed from cabinet.
He has previously served four stints as prime minister.
As prime minister Kilman expelled 12 Australian Federal Police from Vanuatu in 2012, after he was stopped while transiting through an Australian airport and his advisor was arrested by Australian police on tax fraud charges.
Police cooperation between the two nations resumed in 2013 after Kilman lost office.
In June 2015 as leader he travelled to Beijing to meet Chinese President Xi Jinping, pledging closer ties between the two nations.
Vanuatu's largest creditor is China's EXIM bank, accounting for a third of debt, according to the International Monetary Fund (IMF).
Kalsakau's government had sought to widen Vanuatu's international ties after winning a general election in November.
Kalsakau signed a security agreement with major aid donor Australia in December, a month after being elected, although it is yet to be ratified by parliament.
Chairman of the Saudi Fund for Development and Saudi Arabia's Minister for Tourism, Ahmed al Khateeb, met Kalsakau on Saturday in Vanuatu, signing an airport redevelopment deal.
French President Emmanuel Macron visited in July, making a speech where he pledged greater support and warned against a "new imperialism" in the Pacific, comments taken to refer to China.
China has sent police experts to Vanuatu amid the political crisis, and the Vanuatu police force said it would work with "all partners" - Australia, New Zealand and China.
Australia and China sent navy ships carrying relief supplies when two cyclones hit in a week in March.