The court in Paris upheld a complaint by the Caledonia Together Party leader Philippe Gomes, who claimed that the process of choosing Wamytan was in breach of the rules.
In a sitting which two parties boycotted after deeming it to be illegal, Wamytan was chosen by 32 of the 35 members present.
A majority, however, decided to ignore the official closure of the session by the Congress vice president and proceeded with Wamytan’s election.
Gomes and his supporters had left the sitting after bringing down the collegial government for a third time in four weeks amid a yet unresolved dispute over which flag the territory should adopt as part of its decolonization process.
Last month, the French legislature changed New Caledonia’s electoral law to stop serial resignations, by guaranteeing any new government an 18-month grace period.


