Vanuatu's Chief Justice has appointed Edward Natapei as interim prime minister, after declaring November's election of Sato Kilman to be null and void.
Mr Kilman defeated Mr Natapei in a no-confidence vote in November but the speaker then failed to hold a secret ballot to elect Mr Kilman in accordance with the constitution.
Mr Natapei had sought a court ruling about whether Mr Kilman's appointment as prime minister was legal.
Chief Justice Vincent Lunabek has now replaced Mr Kilman's government with Mr Natapei and his former ministers, until a new prime minister is elected.
Mr Natapei says his camp has the support to emerge victorious in a prime ministerial election.
"According to our team yes we do, we have the numbers to elect a Prime Minister from our members."
Edward Natapei has previously indicated he would only stand in as a caretaker prime minister if his court challenge was successful, and that he would maintain his co-operation agreement with Serge Vohor.
Mr Vohor was himself unseated as prime minister last month after Mr Kilman had challenged the constitutionality of a vote of no confidence brought against him just a month after he'd toppled Mr Natapei.
But our Vanuatu correspondent Len Garae says Sato Kilman won the no-confidence vote in November, and the fault was the speaker's in failing to hold a secret ballot.
He says Mr Kilman still has the support of 27 members, which is a majority.
The speaker of parliament is allowed by the Supreme Court, all he needs to do is go back and repeat according to the constitution whereby the candidate is still Mr Kilman, as long as he follows the constitution and is elected by secret ballot.