New Zealand has voted to retain its existing national flag in an historic referendum.
The referendum, the second and final in the $26 million process, closed at 7pm on Thursday, and the preliminary results released that night show voters prefer the status quo.
More than 2 million people voted in the referendum, which pitted the current flag against the alternative silver fern design chosen late last year.
More than 1.2 million people, or 56.6 percent of those who voted, opted to keep the current flag.
More than 915,000, or 43.2 percent, voted for the alternative flag, which was designed by New Zealander Kyle Lockwood.
The total number of votes received was 2,124,507, which included 4942 informal votes (0.23 percent) and 4554 invalid votes (0.21 percent). Voter turnout was 67.3 percent.
Polls had suggested most New Zealanders wanted to keep the current flag.
Speaking at a news conference after the result was announced, Prime Minister John Key said he did not think he would have changed anything about the process.
Several prime ministers before him had suggested a change, he said.
"We worked really hard to take the politics out of the process."
Watch Prime Minister John Key's reaction to the results:
Deputy Prime Minister Bill English said it had been a robust democratic process that allowed New Zealand to discuss how it wanted to be represented on the world stage.
He acknowledged there would be people who were disappointed with the outcome, but said the majority of New Zealanders had spoken and the decision had to be embraced.
Labour leader Andrew Little, however, said Mr Key had "split the nation and achieved nothing".
"At every stage of the process, John Key screwed the scrum in favour of his flag. He made his desire for a fern flag known from the outset ... Three of the four flag options featured ferns."
Mr Little said a discussion about New Zealand becoming a republic should happen before another debate on changing the flag.
The Green Party said the result was a major failure for Mr Key, whose overt campaigning had politicised the referendum and cost New Zealanders the opportunity to get a new flag.
Co-leader Meteria Turei said her party had tried to improve the process by advocating for Red Peak, which was added as a fifth option in the earlier referendum after a public campaign.
"Lots of New Zealanders support a change of flag but voted for the current one because the Prime Minister's interference ensured they weren't given a proper choice," she said.
New Zealand First Leader Winston Peters said he gave "credit to the thousands who turned out to prevent change".
"The process was manipulated from the start with a compliant flag panel choosing decisions to the Prime Minister's liking. Mr Key even got the alternative flown on the Auckland Harbour Bridge, paid for by his own department and the Ministry of Transport," he said.
Change-the-flag campaign sees positives
Change The New Zealand Flag chair Lewis Holden said the campaign had won gains for the debate about national identity.
"I'm really actually ecstatic at this result. Not necessarily the result that we wanted, but what it shows you is that there is sentiment for change.
"This has started the debate about our national identity, and that is the really critical thing... New Zealanders actually said, maybe not now, but in the future, we will actually change our flag.
"Those arguments are still valid and I think there's a lot of people who would support change in the future, including many people who didn't vote in this referendum."
The Returned Services Association, which had campaigned to keep the current flag, said it was pleased with the outcome of the referendum.
The association's national vice president, Bob Hill, said it was important that so many people had their say.
"I'm pleased with the result, I must say. But the big thing is that people were given the opportunity to cast their vote and the majority have given their answer.
"The problem that we saw, for people who wanted to retain the flag, is that they might turn around and say 'oh, it's a foregone conclusion, I won't bother voting' so I'm just pleased that people got out there and voted."
The official results will be released on 30 March.