Helen Clark's push for the top United Nations job failed through no fault of her own. The former prime minister ran a determined campaign, was clearly supported by those who were familiar with her skills such as the staff of the giant agency, and was given every encouragement by the man who replaced her in the Beehive.
She was one of the top female candidates among a talented group who pushed hard to get a woman into the role of Secretary-General.
In the end the choice was determined as it always has been by the big powers on the Security Council. They wasted little time endorsing former Portuguese prime minister Antonio Guterres, front-runner for the job for the past few months.
The council's selection of Guterres is promising in that a panel split by a growing rift between Russia and the West has been able to settle on a candidate who both Moscow and Washington can work with.
Guterres' first task must be striking an agreement to end the carnage in Syria and doing more to secure peace in troublespots. Progress on that front cannot come soon enough. This will require all the skills the trained physicist acquired as head for 10 years of the UN refugee agency.
His in-tray will be full when he starts the job on January 1. The UN has been hit by troubles including sexual assaults by peacekeepers and a bribery scandal. Diplomats hope the next chief will restore credibility to the 71-year-old organisation.
Backers of the push for a woman to run the UN expressed natural disappointment. Jean Krasno, who chaired the campaign to elect a woman, called the outcome "a disaster" and unfair to eastern Europe and women. She is right in the sense that it serves as a reminder if we needed it where power lies within the UN.
The result confirms that change at the UN is a long time coming. The selection process has always lacked transparency though in the contest to succeed Ban Ki-moon a little bit of sunlight intruded. For the first time, candidates faced hearings with members of the Security Council, engaged in debates and took questions from the news media. But this process came to a swift end with yesterday's unexpected council consensus to settle on Guterres as the ninth secretary-general.
Clark must be feeling personally disappointed. She had laid out her intentions clearly, including an ambition to reform the UN, the world's largest institution with a $7.7 billion budget and 44,000 staff. Its track record is spotty and its ability in influence events hamstrung by the veto wielded by the five permanent council members, the US, Britain, France, Russia and China.
Clearly she felt she could knock the UN into more effective shape, and she will be frustrated not to get the chance to rebuild its integrity. But she, and New Zealand, can still admire her achievements. She has been head of the UN Development Programme since 2009, and the most senior woman at the UN. She has much to be proud of.