The former Portuguese Prime Minister Antonio Guterres is poised to become the next Secretary General of the United Nations after topping the sixth ballot.
The Security Council will move a formal recommendation tomorrow after a sixth poll this morning showed he would attract no vetoes by the five permanent five members.
Guterres, a former UN High Commissioner for Refugees, has been ranked first in every ballot.
Former Prime Minister Helen Clark has never ranked more than midfield.
The Security Council recommendation has to be accepted by the 193-member General Assembly of the UN.
In a show of unity, the entire Security Council, including New Zealand ambassador Gerard van Bohemen, emerged from the council chamber after the ballot to announce the overall result.
The overwhelming support for Guterres has been evident in the Security Council despite strong campaigns for the first woman to take the job and for it to go to an Eastern European.
Today's ballot was the first colour-coded one in which P5 members, the US, China, Russia, Britain and France, used red ballots to indicate whether they could veto a candidate - although the vote remained anonymous.
From a total of 15 votes, Guterres polled 13 votes of "encourage," no "discourage" votes, and two "no opinion," one of which was a P5 members.
Helen Clark took to Twitter to congratulate Guterres and then issued a longer statement thanking her supporters.
"I congratulate my long-time colleague Antonio Guterres whom the UN Security Council has agreed to recommend to the United Nations General Assembly as the next Secretary-General of the United Nations.
"Antonio and I met when we were both Prime Ministers, and have worked together as heads of major UN agencies in recent years.
"Antonio has the knowledge and experience to lead the United Nations well, and I wish him every success.
"I deeply appreciate the full support I have had throughout my campaign for the position of Secretary-General from Prime Minister John Key, Minister of Foreign Affairs Murray McCully, the New Zealand Government and the Ministry of Foreign Affairs and Trade, and a very wide cross section of the New Zealand Parliament and public.
"Public and governmental support also came from around the world.
"To all who supported my campaign, I thank you for your confidence in me and your many messages of support and encouragement."
Prime Minister John Key said the result reflected a view that if the post was not filled by an Eastern European, then it should be a candidate from Europe.
He also said there was some genuine concern that Helen Clark was seen as a reformist and someone who would not necessarily "toe the line of the P5."
"I personally think that that is what the United Nations needs," he said on RNZ.
"I actually think Helen may have been a lot more careful about that than they may have feared."
"They are used to, frankly, a Secretary-General which tends to toe the line a little bit more.
"I happen to think that she is so well versed in foreign policy and so knowledgeable about the intricate details that I don't think it is likely she would have over-stepped the mark or done something silly. That's not the Helen Clark style.
"And frankly the United Nations needs to change."
Key said he suspected that Russia had done a deal with the US and Britain to coalesce around Guterres if it did not look as though as Eastern European would make it.
Russia and France were thought to have vetoed Clark but he said if the third indicative veto was from the United States it would not necessarily have been "because they were anti-Helen at all but because they might have just agreed 'we'll do a deal' and the deal is it is not an Eastern European but it's Europe's turn."
He also said Antonio Guterres was very well respected.
"We congratulate him. We wish him the best and we think he will do very well.
"He has come from 10 years as the commissioner for refugees and this is the time when the world is facing a refugee crisis. There's no question that he has the credentials to do the job. It's just not the candidate we would have wanted."
In a formal statement Key described Guterres as "a friend of New Zealand" and said he looked forward to working with him.
"The role of UN Secretary-General is more important than ever and we have high expectations of him."
Key said he was obviously disappointed for Helen Clark.
"We did everything we could to support Helen. She would have been an outstanding Secretary-General but the clear preference was for Antonio Guterres.
"Helen fought a good campaign and New Zealanders can be proud of her."
Speaking to the Herald from Brussels, Foreign Minister Murray McCully said that "clearly the desire for a European Secretary General has been a very strong element in the voting so far and that has proven to be decisive today."
Asked if the contest had been worth it, McCully said: "It has been a unique occasion for New Zealand to have someone who has been qualified to put themselves forward for this office.
"It is something that can only be done by someone who has got both the senior Government leadership credentials and the UN credentials that she has got.
"While we are disappointed with the outcome, it is, I think, always worth putting forward New Zealand candidates on the unique occasions where we have got someone who has the credentials to be put forward."
He said the result was no discredit to her that she was unable to come through and the result had been a result of the level of commitment to the rotational process.
Labour leader Andrew Little said Clark had been an extraordinary ambassador for New Zealand in her role as head of the UN Development Programme "and she would have been an outstanding Secretary General."
He said the efforts of John Key, Murray McCully and the diplomatic service in advocating for her deserved much credit.
But he was disappointed a woman had not been chosen - over the course of the contest, there have been seven women out of 14 candidates.
"Given the number of women candidates for the role it is disappointing the Security Council couldn't break from the past and demonstrate it believes in diversity at the highest levels," he said.
Helen Clark's personal result in today's ballot improved slightly on the last one, coming fifth out of 10, compared to the last ballot when she came second to last from a field of nine.
She polled six encourage, eight discourage, and one no opinion.
The three vetoes are thought to have been from Russia, France and the United States.
In terms of potential vetoes, Susana Malcorra from Argentina attracted only one, and three candidates attracted only two: Miroslav Lajcak from Slovakia, and Irina Bokova and Kristalina Georgieva both from Bulgaria; four candidates attracted three: Clark, Srgjan Kerim from Macedonia, and Natalia Gherman from Moldova; and one, Danilo Turk of Slovenia, attracted four.
Guterres was Prime Minister of Portugal from 1995 to 2002, then UN High Commissioner for Refugees from 2005 to 2016.
The ranking of today's ballot, with ranking in previous five ballots:
1. Antonio Guterres, Portugal (1, 1, 1, 1, 1,)
2. Miroslav Lajcak, Slovakia (7, 10, 2, 2, 3)
3. Vuk Jeremic, Serbia (4, 2, 3, 3, 2)
4. Irina Bokova, Bulgaria (3, 5, 3, 5, 6)
5. Helen Clark, New Zealand (6, 7, 7, 8, 7=)
6. Susana Malcorra, Argentina (8, 3, 5, 7, 4=)
7. Kristalina Georgieva, Bulgaria (first ballot)
8. Danilo Turk, Slovenia (2, 4, 8, 6, 4)
9. Srgjan Kerim, Macedonia (5, 6, 6, 4, 7=)
10. Natalia Gherman, Moldova (10, 9, 9, 10, 9)
The results of today's vote
• Number of Encourage votes, Discourage (and red votes indicating a potential veto) and No Opinion.
1. Antonio Guterres, Portugal, 13 Encourage, 0 Discourage, 2 No opinion.
2. Miroslav Lajcak, Slovakia, 7 Encourage, 6 Discourage (2 red), 2 No opinion.
3. Vuk Jeremic, Serbia, 7 Encourage, 6 Discourage (three red), 2 No opinion.
4. Irina Bokova, Bulgaria, 7 Encourage, 7 Discourage (two red), 1 No opinion.
5. Helen Clark, New Zealand, 6 Encourage, 8 Discourage (3 red), 1 No opinion.
6. Susana Malcorra, Argentina, 5 Encourage, 7 Discourage (1 red), 3 No opinion.
7. Kristalina Georgieva, Bulgaria, 5 Encourage, 8 Discourage (2 red), 2 No opinion.
8. Danilo Turk, Slovenia, 5 Encourage, 8 Discourage (4 red), 2 No opinion.
9. Srgjan Kerim, Macedonia, 5 Encourage, 9 Discourage (3 red), 1 No opinion.
10. Natalia Gherman, Moldova, 3 Encourage, 11 Discourage (3 red), 1 No opinion.