David Cunliffe has won the Labour leadership with 51.15 per cent of the total vote.
Supporters at Mr Cunliffe's small New Lynn electorate office have erupted into applause as the result was announced.
Speaking to his supporters, Mr Cunliffe said today was a new beginning for Labour and New Zealand.
"Tomorrow morning we start our election campaign against the Key government."
Mr Cunliffe said the only way he could repay his supporters was to become the leader they believed he could be.
He fought back tears as he thanked those who had supported him throughout the leadership battle.
"We're going to be a fighting team and we're going to fight the Key Government."
Mr Cunliffe said his overriding priority was to unite the Labour caucus.
The leadership win meant he had not been handed the leadership, but a job.
"That rests on the shoulders of me and my colleagues, we will not let them down."
He said he was grateful for his family's support.
"Obviously it's going to be very tough on them."
Cunliffe said he was yet to decide Labour party rankings or portfolio positions.
"I have every confidence in my colleagues that we will be a force to be reckoned with.
"This is not a split caucus...this is a united caucus."
Mr Cunliffe said raising taxes will be an election policy for the Labour party under his leadership. "You bet."
He said he has yet to decide whether he will take on a portfolio.
David Cunliffe's victory of just over 50 per cent was achieved on the first round of voting without calling on second preferences.
The caucus' 34 total votes are worth 40 percent of the total.
Mr Cunliffe won 32.35 per cent (11 MPs) of the 34 MPs, or 12.94 per cent of the total vote.
Mr Robertson won 47.06 per cent of the caucus (16 MPs) and Mr Jones won 20.59 per cent (7 MPs).
Membership vote is worth 40 per cent of the total.
Mr Cunliffe won 60.14 per cent of membership support, or 25.05 per cent of the total.
Mr Robertson won 26.71 per cent of the party and Mr Jones won 13.15 per cent.
The affiliated union vote is worth 20 percent of the total.
Mr Cunliffe won 70.77 per cent of the affiliated unions of 14.11 per cent of the total vote.
Mr Robertson won 17.3 per cent of the affilates and Mr Jones won 11.92 per cent.
Mr Cunliffe's 12.94 per cent for caucus, 25.05 per cent for membership and 14.11 per cent for unions get him to 51.15 per cent (rounded up).
If Mr Cunliffe had fallen under 50 per cent after the first round of counting, Mr Jones would have been eliminated and his supporters' second preference votes redistributed to Mr Cunliffe or Mr Robertson.
The Labour Party has released the preferences. So it is possible to say that preferences would have evened out MPs' support if it had gone to a second round, with Mr Cunliffe getting five of Mr Jones' supporters' second preferences and Mr Robertson just 2, leaving Mr Cunliffe 16 and Mr Robertson 18.
The result was announced by party general secretary Tim Barnett at Labour headquarters in Wellington.
Mr Cunliffe received the news at his New Lynn electorate office.
ROBERTSON PLEDGES LOYALTY
Grant Robertson said Mr Cunliffe would make a great leader and an outstanding Prime Minister.
He was told the news in the capital where he is Wellington Central MP.
He said Mr Cunliffe had his "100 per cent loyalty" and his "total commitment".
He was not concerned that Mr Cunliffe had received less support in caucus than him.
"I have complete confidence that the caucus will now move forward together."
Mr Robertson said he was disappointed to be defeated but he supported the process and the outcome.
He said it was too early to talk about future leadership aspirations and he was absolutely committed to serving Mr Cunliffe.
Asked whether he would rule out another run at the leadership, he said: "I'm 41."
He added that it could be a possibility after Mr Cunliffe served "three or four terms as Prime Minister".
LABOUR 'RELEVANT AGAIN' SAYS JONES
Shane Jones, a list MP, received the news at the Manurewa RSA. After the result, he said "it has been an invigorating race, the new Labour leader David Cunliffe will have my unstinting support... Next year we have a bigger contest, that's to take on John Key government."
He says he started the race as a underdog and he had a "different mission" which was to get people talking about Labour again.
"We made ourselves relevant again."
He said he wouldn't put his name in the ring for deputy leadership and he'd be keen to see a female MP take on the role.
GREENS CONGRATULATE CUNLIFFE
Green Party co-leaders Metiria Turei and Russel Norman congratulated Mr Cunliffe this afternoon.
Mrs Turei said the Greens had a constructive relationship with the previous leader David Shearer and looked forward to a good relationship with Mr Cunliffe.
She said the two parties shared common ground on electricity reform, introducing a capital gains tax and committing to a living wage, and opposing asset sales and National's deal with Skycity for convention centre.
"We look forward to continuing to work alongside Labour on these areas to make New Zealand a smart, greener, more compassionate place to live."
SHEARER STEPS ASIDE
Former leader David Shearer resigned on August 22, after it because clear he would face a non-confidence motion against him by former supporters if he stayed.
Mr Shearer beat Mr Cunliffe to the top job in December 2011 after Phil Goff stepped down.
This is the first time that new rules have been used which allow members and affiliated unions to vote on the leadership.
The rules were proposed and supported by party members at the party conference in November 2012 because many members were unhappy that the caucus had chosen Mr Shearer over Mr Cunliffe.
Labour is now in its second term in Opposition and the next general election will be at the end of next year.
- Additional reporting Alanah Eriksen