Four-time Vanuatu prime minister Sato Kilman has been elected to the top job for a record fifth time on Monday in Port Vila, ousting Alatoi Ishmael Kalsakau's nine-month reign as the leader of government.
Kilman received a total of 27 votes, while Kalsakau got 23 votes.
Kilman, 65, was the deputy PM in Kalsakau's government before being removed in May. At the time Kalsakau had stated that Kilman's dismissal was for "stability of the coalition government".
"Mr speaker first and foremost I want to say a big thank you to the members of parliament and the political parties that supported the change in government. Thank you," he said.
"But thank you even more for standing your ground and for ensuring that democracy prevails in Vanuatu."
Earlier on Monday, Vanuatu's highest court - the Court of Appeal - dismissed an appeal against the removal Kalsakau.
Last month the opposition grouping, led by former PM Bob Loughman, brought a motion of no-confidence in Kalsakau.
They garnered 26 of the 49 votes cast but the parliamentary speaker ruled they had not reached what he considered the minimum 27 required for a successful motion in the 52 member House.
Loughman's group appealed to the courts, which last week ruled in their favour, but the speaker appealed that decision.
That appeal was dismissed today bringing an end to Kalsakau's tenure and triggering the election of the new prime minister.
Sato Kilman was sworn in as prime minister immediately after the vote on Monday evening.
He is expected to announce the composition of the cabinet of his new coalition government later this week.