Pro-independence Oscar Temaru has won a by-election in French Polynesia but not enough seats to secure a majority in the assembly, provisional results show.
Conservative Gaston Flosse is battling to retain power
Mr Temaru's Union for Democracy looks set to win 25 of 37 seats voted for on Sunday, while the conservative party of President Gaston Flosse won 10 seats.
This means that both parties now hold 27 seats each in the national assembly.
The election was called to end a political crisis after a poll victory by Mr Temaru was annulled last year.
France's highest administrative court, the state counsel, had called for new elections on two of the French Polynesia's main islands, including Tahiti, citing voting irregularities in some polling stations.
Provisional results of these indicate both parties will hold the same number of seats, and Nicole Bouteau's Alliance for a New Democracy will hold the remaining three.
It is not clear who will now hold the balance of power.
Mr Temaru became the country's first pro-independence leader when he was elected last May, but his grip on power did not last long.
He was defeated in a vote of no-confidence and the top job went back to his old rival, Mr Flosse, who has dominated politics in the archipelago for two decades.
He is a long-standing ally of French President Jacques Chirac, and the pro-independence movement said Paris had conspired illegally to reinstate Mr Flosse, allegations that French authorities have strongly denied.