New Zealand has voted to keep its current flag by a margin of 57 percent to 43 percent in a nationwide poll that ended Thursday.

More than 2 million people voted in the ballot to decide whether to keep the British Union Jack on their flag or replace it with a silver fern.

The current flag has been the national symbol since 1902. It was up against a new design that was winnowed from more than 10,000 entries submitted by the public.

Those advocating change argued the flag was a relic of the nation's colonial past and too similar to Australia's flag.

But the alternative design failed to gain the momentum it needed to win. While many liked it and people across the country began flying it from their homes and businesses, some considered it garish, a design better suited to a beach towel.

The vote had been orchestrated by Prime Minister John Key who was an eager proponent of change. But some saw the endeavor as an effort by him to create a legacy. Others were put off by the cost: 26 million New Zealand dollars ($17 million).

In the end, the vote represented a rare political defeat for Key, who has won three straight elections and led the country for eight years.

"Naturally I'm a little bit disappointed the flag didn't change tonight," Key told reporters.

He said, however, that every schoolchild had become involved in the debate, which had been good for the nation. He said he was proud to see so many flags flying over recent weeks and would now support the current flag even though it wasn't his first choice.

Organizers said deciding the issue by popular vote represented a world first, with other countries changing flags by revolution, decree or legislation.

John Burrows, a law professor who led a panel who chose a shortlist of alternative flag designs, said the process had been challenging from the start and the panel was breaking new ground. He said one thing they learned was that everyone has different tastes and there's no such thing as a perfect flag.

Opposition leader Andrew Little said the next time the flag issue will be discussed will likely be after Queen Elizabeth II dies, as part of broader debate about the nation's constitution, including whether it should become a republic.

Voter turnout in the mail ballot was 67 percent, with 2.1 million votes cast from the country's 3.2 million registered voters. The official result will be announced next week.