The vote rejecting a breakaway from France after almost 170 years came in at 53.26 percent, according to final results, down from 56.7 percent in a referendum two years ago.
French President Emmanuel Macron — who had said previously that “France would be less beautiful without New Caledonia” — on Sunday said he was grateful to the archipelago's voters.
“I welcome this sign of confidence in the republic with a profound sense of gratitude,” Macron said from his office.
He added that he also felt “humility” at the outcome which showed a clear progression of the pro-independence vote compared with the independence referendum in 2018.
A ballot box at a polling station in the referendum on independence on the French South Pacific territory of New Caledonia in Noumea on October 4, 2020. Theo Rouby / AFP
(article continues below)
See also on The Local:
Sunday's referendum was part of a carefully negotiated decolonisation plan agreed in 1998 which ended a deadly conflict between the mostly pro-independence indigenous Kanak population and the descendants of European settlers.
That violence culminated in a bloody, drawn-out hostage crisis in 1988 that saw 19 separatists killed, along with six police and special forces personnel.
Another referendum can be held by 2022 so long as the poll is requested by at least a third of the local legislature.
Most political observers had forecast a win for the no-vote as well as a narrower margin.
Turnout was 85.64 percent, more than four points higher than last time, as the prospect of a tight race brought voters out in droves, patiently awaiting their turns at polling stations.
“I waited 45 minutes. It's very important for me to vote,” said retiree Germaine Le Demezet in the capital Noumea.
People wait in line to cast their vote in the referendum on independence on the French South Pacific territory of New Caledonia, in Noumea on October 4, 2020. Theo Rouby / AFP
'We need to know'
“I have children and grandchildren here, the future needs to be clear and we need to know what's going to happen to us.”
New Caledonia has taken strict measures to keep the coronavirus out of the territory, and with case numbers low, the referendum took place without masks and other measures.
A man casts his vote at a polling station. Theo Rouby / AFP
New Caledonia, situated between Australia and Fiji and sometimes called “The Pebble”, was seized by France in 1853 and is home to 270,000 people.
The economy's mainstays are the production of metals, especially nickel of which New Caledonia is a major global producer, as well as tourism and financial support from mainland France.
A view of New Caledonia, AFP.
The French government, from more than 16,000 kilometres (10,000 miles) away, subsidises the territory with around 1.5 billion euros ($1.75 billion) every year, the equivalent of more than 15 percent of New Caledonia's gross domestic product.
A special authorisation allowing the French national flag to be used in campaign spots angered the pro-independence Kanak and Socialist National Liberation Front (FLNKS), which accused Paris of taking sides against independence. The last colonies to gain independence from France were Djibouti in 1977.