The French Polynesian assembly has elected the opposition's Oscar Temaru as assembly president in what is a major set-back for the ruling coalition led by Gaston Tong Sang.
In the third round of voting, Mr Temaru secured 30 of the 57 votes to replace Philip Schyle, who had held the position for the past year.
The coalition's candidate, Gaston Flosse, secured only 12 votes in the first and second round and failed to make the run-off between Mr Temaru and another opposition candidate, Jean-Christophe Bouissou, who won 20 votes in the final round.
The move the renew the assembly leadership came after the ruling coalition earlier this week formally agreed to replace Mr Schyle in line with a deal its members had reached last November when Mr Tong Sang abandoned his coalition with Mr Temaru and sided with Mr Flosse's Tahoeraa Huiraatira to form a new government.
The deal was for the Tahoeraa to be given the assembly leadership while the presidency was held by Mr Tong Sang's To Tatou Aia.
Fearing his ouster last week, Mr Schyle quit Mr Tong Sang's camp in protest at the party being poised to be honouring its November commitment to cede the assembly presidency.
The coalition's failure to secure the post for Mr Flosse in the first round of voting prompted Mr Tong Sang to ask Paris to dissolve the assembly.
He said it was no longer possible to run the territory's government under such circumstances.
The last early election was held two years ago under a new electoral system imposed by France but the new government, at the time led by Mr Flosse, lasted only one month into its five-year term.