United Nations: Former Portuguese Prime Minister Antonio Guterres will be the next UN secretary general.

The 67-year-old statesman will replace Ban Ki-moon at the beginning of 2017.

This became clear as none of the five UN Security Council veto powers voted against him in a sixth secret ballot on October 5, diplomats said.

In a rare show of unity, the 15-member Security Council cast secret ballots for each of the 10 candidates with the choices of encourage, discourage or no opinion. Guterres received 13 encourage votes and two no opinion votes.

“Today after our sixth straw poll we have a clear favorite and his name is Antonio Guterres,” Russian UN Ambassador Vitaly Churkin told reporters with his 14 council colleagues standing behind him.

“We have decided to go to a formal vote tomorrow morning at 10 O’clock, and we hope it can be done by acclamation,” said Churkin, who is council president for October.

For Guterres to be formally recommended to the 193-member General Assembly for election, the Security Council still needs to adopt a resolution behind closed doors. The resolution needs at least nine votes in favor and no vetoes to pass.

Guterres had led the UN refugee agency for 10 years.

An engineer by trade, Guterres first entered into politics in 1976 in Portugal’s first democratic election after the “Carnation revolution” that ended five decades of dictatorship.

He quickly rose in the ranks, becoming leader of the Socialist party in 1992 and was elected prime minister in 1995.

As head of the UNHCR refugee agency from 2005 to 2015, Guterres led the agency through some of the world’s worst refugee crises, including Syria, Afghanistan, Iraq.

During that time, he repeatedly appealed to Western states to do more to help refugees fleeing the conflicts.

Former Portuguese President Anibal Cavaco Silva said earlier this year that Guterres had “left a legacy” at the refugee agency “that means today he is a respected voice and all the world listens to him,” according to the AFP news agency.

There was some disappointment among campaigners who had hoped for a first female secretary general, or a candidate from Eastern Europe – which has never held the position.

In the final ballot, the highest-placed woman candidate, the head of Unesco, Irina Bokova, finished fourth. Another female candidate for the job, Costa Rican diplomat Christiana Figueres described the result as “bittersweet”.

“Bitter: not a woman. Sweet: by far the best man in the race. Congrats Antonio Guterres! We are all with you,” Figueres tweeted.

But the process was “remarkably” uncontroversial, said Samantha Power, the US representative to the UN.

“In the end, there was just a candidate whose experience, vision, and versatility across a range of areas proved compelling,” she said, adding that the process involved more scrutiny than ever before.

“People united around a person who impressed throughout the process.”

The UK’s Matthew Rycroft said Guterres “will take the United Nations to the next level in terms of leadership” and be “a moral authority at a time when the world is divided on issues.”

The abrupt end to the UN leadership race came as a surprise. Many observers had expected the selection process to go on late into October as the major powers struggled to promote their favourite candidates. And some thought that Russia, currently holding the presidency of the security council, would block Guterres, as Moscow had said it wanted an eastern European in the top UN job.

Guterres had vowed to carry on being a spokesman for the downtrodden if he became UN secretary general.

“I am totally committed because of what I felt as head of UNHCR for 10 years,” he said during a debate between candidates chaired by the Guardian this summer. “You can’t imagine what it is to see levels of suffering that are unimaginable.”

The fact that he was promising to be an activist on humanitarian causes also makes Guterres victory surprising, as both Russia and China in particular have been resistant to outspoken activists in top UN posts. Also there was widespread sentiment this year that it was time for a woman to run the organisation for the first time in its 71-year history and there were several strong female candidates in the contest.

“I think it’s an excellent choice,” said Michael Doyle, a former UN assistant secretary general and now a Columbia University professor. “We have someone who has great political capability, having been prime minister of his country, he is a strong multilateralist, having a run the UNCHR at a time of tremendous challenges, and he has ways of communicating with an audience that are inspiring.”

Richard Gowan, an expert on the UN at the European Council on Foreign Relations said: “The big question is whether Guterres has had to offer Russia and China big concessions to let him win, such as senior political or peacekeeping posts at UN headquarters. That may not become clear for some weeks or months.”

The quick end to the contest was a particular blow for the European commission’s vice-president, Kristalina Georgieva, who made a belated entry to the race last week. Her candidacy only lasted a few days and eight council members voted against her, including two permanent member vetoes.

The contest to replace Ban as secretary general began in April with public hearings in the UN general assembly, the first time candidates for the job had had to make their pitch in public. The new transparency was a result of a groundswell of pressure from civil society activists, in the 1 For 7 Billion movement.

“This is a testament to the new open process,” said Natalie Samarasinghe, executive director of the United Nations Association – UK and one of the founders of the 1 For 7 Billion movement. “When we looked at the candidates likely to prevail at the start of the race, he wasn’t a strong contender. He became one because of the open process.”