Philippe Germain has been re-elected as president of New Caledonia, ending a three-month stalemate within the new government.
His election comes a day before the arrival in Noumea of the French prime minister Edouard Philippe and means that New Caledonia now has a properly constituted government for the first time since August.
After a week of negotiations, 10 of the 11 ministers from both the pro- and anti-independence sides elected Mr Germain who has been the only candidate.
The only dissent comes from the anti-independence Caledonian Republicans, which on the eve of the vote denounced the agreement to elect him as a secret deal.
In a joint declaration, the parties electing Mr Germain said they agreed to set an end to the crisis given the range of important issues in front of them, including next year's independence referendum.
This year's election of a new government was prompted by the resignation in August of a minister Philippe Dunoyer who chose to take up the seat he had won in the French National Assembly.
In New Caledonia, the resignation of a minister means that the entire government falls and a new administration has to be elected by the territory's Congress.
Two years ago, New Caledonia had a similar situation when a three-month deadlock was broken when pro-independence ministers decided to vote for Mr Germain who also then failed to get a majority from the anti-independence camp.