French Polynesia's assembly has re-elected Edouard Fritch of the Tahoeraa Huiraatira Party as assembly president.
Mr Fritch defeated the candidate of the Union For Democracy, Antony Geros, who secured only 21 of the assembly's 57 votes.
His election came after days of inconclusive talks among pro-autonomy politicians in the lead-up to today's session which opened late because of ongoing negotiations.
But when the sitting opened it emerged that the Tahoeraa had decided to support the bid by the To Tatou Aia coalition to form the next government.
As part of the apparent deal, Mr Fritch's candidacy was announced by the To Tatou Aia leader, Gaston Tong Sang.
However, one member of the 37-strong so-called pro-autonomy bloc went to Mr Geros.
The election of a president will be held in two days.
It is not known if Oscar Temaru of the Union For Democracy will seek re-election.