The French Polynesian assembly has approved a no confidence motion ending the 15-month tenure of the government of Gaston Tong Sang.
29 of the assembly's 57 members voted for the motion, which has automatically made the pro-independence leader, Oscar Temaru, the president.
It's the fifth time in seven years that Mr Temaru has been chosen to head the executive.
Before the vote, Mr Temaru's side, which includes most so-called outer island members, was assured of the support of 28 members only but a former anti-independence member, Chantal Galenon, cast her ballot in favour of the motion, giving it the minimum support to pass.
Mr Temaru has five days to form a government.
The new majority wants to seek the territory's resinscription on the UN decolonisation list - a move which this week has won the backing of the Melanesian Spearhead Group.
The Pacific Islands Forum has repeatedly ignored Mr Temaru's lobbying on the matter.