David Cunliffe is the new leader of the Labour Party.
Former leader David Shearer announced his resignation on 22 August, prompting a three-way contest for the leadership.
Under new rules where party members and affiliated unions got to vote along with MPs, the MP for New Lynn defeated Grant Robertson and Shane Jones.
Mr Cunliffe received the most support from party members and affiliated unions, with 60.14% and 70.77% respectively.
However, nearly half of the party's MPs voted for Mr Robertson, at 47.06%, compared with 32.35% for Mr Cunliffe.
Mr Cunliffe has offered an olive branch to his defeated challengers saying he will give senior positions to both Grant Robertson and Shane Jones.
He says his first priority as leader will be to unite Labour MPs to work together to defeat the National-led Government at next year's election.
"Today I've not been handed a victory, I've been handed a job and this is a job on behalf of our whole team, it's a very serious job, the trust of many thousand members of the Labour Party is now not only on my shoulders but on those of my colleagues - we will not let them down."
Mr Cunliffe says he will reach right across the Caucus to ensure MPs from different groups get senior leadership roles.
Robertson and Jones give Cunliffe full support
Grant Robertson says he fully accepts the result, and says Mr Cunliffe will make an outstanding party leader.
"David Cunliffe has my 100% loyalty as leader and my total commitment to work over the next year to see him become a prime minister."
Mr Robertson will resign as deputy to allow the Caucus to have its say on who should take up that position under the new leadership.
MPs are likely to vote on Tuesday, with Mr Robertson expected to be one of the main contenders.
Shane Jones says he knew he was the underdog, but wanted to present a new message to New Zealand voters.
Mr Jones told supporters at the Manurewa RSA in Auckland, he is not disappointed by the result.
"I really had a slightly different mission which was to jolt our party and begin to talk in such a way that we made ourselves relevant again not just to party members but to voters who seem to have walked away from Labour."
Mr Jones says he will give his unstinting support to Mr Cunliffe as leader.
He says he won't be putting his hand up for deputy leader, as he'd like to see one of the women MPs take up that position.
No need for second round voting
The party's General Secretary and returning officer, Tim Barnett, made the announcement at the party's headquarters in Wellington on Sunday afternoon.
"David Cunliffe is the new leader of the New Zealand Labour Party, elected on the first round of the preferential system. He received 51.5% of the first preferences, with Grant Robertson receiving 32.97% and Shane Jones receiving 15.88%," said Mr Barnett.
The contest was held under new rules for the first time, whereby Labour MPs had 40% of the vote, party members 40% and affiliated trade unions 20%.
There was no need to go to a second round under the preferential voting system, with Mr Cunliffe winning the first round with 51% support.
Mr Robertson received the next highest votes after Mr Cunliffe.
The three MPs have held 12 'meet the candidate' style meetings around the country over the last couple of weeks.
Mr Cunliffe was a diplomat before entering Parliament in 1999.
He was Minister of Health in Helen Clark's Government between 2005 and 2008.
After the 2008 Labour Party defeat, Mr Cunliffe became the party's finance spokesperson and number three in the caucus.
When Labour lost the 2011 election, Phil Goff stood and down and Mr Cunliffe unsuccessfully ran for the leadership, but lost to David Shearer.
Last year at the party's annual conference, Mr Cunliffe was demoted to the backbench after he was seen to undermine Mr Shearer's leadership.