French Polynesia's assembly has approved the text of the Elysee Accord drawn up between the government in Tahiti and the former French president Francois Hollande.
The vote was 31 for the text and 26 against, with the opposing votes being cast by the pro-independence Tavini Huiraatira party and the pro-autonomy Tahoeraa Huiraatira party.
The Accord, which was a broad roadmap for the relationship between the two sides, was expected to be endorsed by the new French administration of Emmanuel Macron.
It calls for a re-affirmation of French Polynesia's ties to Paris, countering the opposition's UN-approved decolonisation effort.
The Accord was also to recognise the nuclear legacy, facilitating the compensation process for the victims of the weapons tests.
It provides for revisiting the trial of the late exiled leader Pouvanaa a Oopa who many believe was the victim of what is being described as colonial justice.
The Accord also provides for assistance towards the territory's economic development.