The French Pacific territory of New Caledonia will hold a referendum on self-rule next year, under a deal reached with the French government.
New Caledonian leaders held nine hours of talks with French ministers in Paris on Thursday. The political agreement could pave the way for independence.
November 2018 is the deadline for the vote. New Caledonia, east of Australia, has about 275,000 inhabitants.
In the 1980s there were clashes between French forces and indigenous Kanaks.
The climax of that conflict was when Kanak separatists held a group of French gendarmes hostage in a cave. The French assault cost the lives of 19 Kanaks and two soldiers.
The 1998 Nouméa Accord envisaged a phased French decolonisation, with a referendum in 2018 at the latest. Kanaks form about 45% of the population.
If a majority opts for independence it will be the first French territory to break away since Djibouti (1977) and Vanuatu (1980).
Prime Minister Edouard Philippe said Thursday's talks "resulted in a political agreement and, perhaps even beyond that, we have trust, which is just as important". He will visit New Caledonia later this month.
He said the government and New Caledonian politicians agreed on the size of the electorate, locations for polling stations and the presence of UN election observers.
But the wording of the referendum question has not yet been decided.
French nationalism is strong among the territory's ethnic Europeans - and that was reflected in the votes cast in the French presidential election in May.
In the first round, in New Caledonia, far-right National Front (FN) leader Marine Le Pen got more than double the votes cast for Emmanuel Macron, who won in the second round. The voting was nearly 30% for Ms Le Pen, 12.76% for Mr Macron.
In May Mr Macron said he hoped the territory would remain part of France, as "the French presence is necessary to guarantee peace and development" there.
He said New Caledonia was struggling with high rates of unemployment, educational failure, alcoholism and youth crime.
New Caledonia is represented in the French parliament by two deputies and two senators.
It has a congress which elects an executive with powers over some policy areas - notably policing, education and local laws.