The tiny Pacific territory of New Caledonia has voted to remain part of France in a long-awaited independence referendum which saw a much closer final result than expected.
A colonial legacy of an empire that no longer officially exists, New Caledonia is one of a handful of territories in the region which have long been governed from afar but are increasingly pushing for self-rule.
The islands came closest to independence than ever before Sunday, with 56% of voters choosing to remain part of France in the first of three possible referenda on the territory's future.
Another independence vote can be held in 2020 if the local government approves it.
New Caledonia is an archipelago in the southwest Pacific Ocean, around 1,120 kilometers (750 miles) east of Australia and 17,000 kilometers (10,500 miles) from metropolitan France.
While some powers have been devolved to the islands, their population are French citizens and vote in the country's elections, one of 12 overseas territories France retained sovereignty over since the end of colonialism.
Around 40% of the population are indigenous Kanaks, with the next largest ethnic group being ethnic Europeans, at just over 27% in the latest census.
While the first European to sight New Caledonia was British explorer James Cook, who named it after the Latin term for today's Scotland, the islands were officially annexed by France in 1853 on the order of Emperor Napoleon III.
In the wake of World War II and a general movement towards decolonization worldwide, France adjusted how it dealt with its colonies and autonomy was gradually increased within areas which did not win full self-rule. This coincided in recent decades with greater organization by pro-independence parties in New Caledonia.
After an occasionally violent separatist campaign, in 1998 the French government signed an agreement with an alliance of pro-independence political parties, the Kanak and Socialist National Liberation Front (FLNKS), to hold three referendums on full independence slated for this year, 2020 and 2022, should the local government wish to hold them.
"Do you want New Caledonia to attain full sovereignty and become independent?" the islands' 175,000 eligible voters were asked, with around 56% saying "no," and 44% voting "yes."
The result was much closer than expected, with some pre-referendum polls showing up to 70% of voters backed remaining part of France ahead of Sunday's vote.
Of New Caledonia's three provinces, two -- North Province and the Loyalty Islands -- voted for independence while a majority of voters in South Province, which is largely ethnic European, chose to stay with France.
What was the reaction?
French President Emmanuel Macron said after the vote that he was "proud that the majority of Caledonians have chosen to stay French."
"It is a mark of trust for France, our future and our values. Every one of us can feel and share in this pride," said Macron.
The French leader did not mention the possibility of holding future referendums, noted Les Nouvelles Calédoniennes (LNC), the islands' main newspaper. The newspaper predicted that the strong showing by the "yes" campaign will be used as an argument for another poll in two years.
However, the paper also noted that while a "vast majority" of indigenous Kanaks voted for independence, other ethnic groups did not, which it said showed a failure of pro-independence groups to win over voters outside their historic support base.
There was some minor violence post referendum, with roads near the capital blocked by wrecked cars and burning tires, according to La Première, a French public broadcaster which covers the country's overseas territories. Video posted by LNC showed heavily armored police vehicles sent to the area to clear the affected roads.
What comes next?
Given the pro-French sentiment ahead of the polls, few supporters of independence expected victory in this weekend's referendum. Instead, most were looking to the future.
"For us it's just a question of time, and you know that time in Oceania is measured differently," FLNKS independence spokesperson Daniel Goa said in a speech at Australia's Lowy Institute last month.
"As long as a single Kanak person is standing, he will fight for his freedom," he added. "We are this country, we are this land, it is Kanak and it will remain Kanak forever."
While an official date for the 2020 referendum has yet to be agreed, it is unlikely local authorities would not approve holding it as set out under the terms of the 1998 agreement.
New Caledonia's push for independence could also have a ripple effect in the region. Six other places in the Pacific are included on the United Nation's list of Non-Self-Governing Territories along with New Caledonia: American Samoa, French Polynesia, Guam (US territory), Pitcairn (British territory) and Tokelau (New Zealand territory).
Even in self-governing parts of the Pacific, there are movements to break colonial ties once and for all, with Australia, which still recognizes the UK's Queen Elizabeth II as its head of state, seeing a surge in pro-republican sentiment.