Jacinda Ardern is New Zealand's next prime minister.
Labour will lead the next government in a coalition with NZ First.
The Greens are expected to back Labour on confidence and supply, giving the combined parties 63 seats, two more than the 61 majority they need.
Stepping into government brings the left out of the cold of opposition for the first time in nine years.
Ms Ardern, who only found out the news at the same time as the rest of the country, opened her first press conference as prime minister elect by acknowledging her predecessor in the role, National leader Bill English.
"I want to thank Bill English for the role he has played in this campaign but also as prime minister and as serving in the past as NZ's finance minister," she said.
"Mr English has already called me this evening and acknowledged that negotiations for the National Party have now concluded."
Labour will hold a caucus meeting on Friday morning to select a cabinet. Four places will go to NZ First MPs while they will also have a parliamentary undersecretary.
The Greens are expected to have proportional representation, but given that party is still finalising arrangements Ms Ardern would not go into detail about whether those roles would be inside cabinet or not.
Mr Peters has been offered the role of deputy prime minister, pushing aside Labour's deputy Kelvin Davis, but Ms Ardern said he was still considering whether to take up that offer.
Mr English addressed the media backed by his wife Mary, deputy leader Paula Bennett and senior colleagues Steven Joyce, Todd McClay, Gerry Brownlee and Nathan Guy.
"I'm naturally disappointed for the 44.5 per cent of people who voted for us, and the team," Mr English said, gracious in defeat.
He said Ms Ardern's rise to prime minister was "remarkable" and offered the advice not to take herself too seriously.
The party will hold a caucus meeting next week to discuss the way forward. Whether Mr English continues to lead the party will be a matter for the coming weeks, he said.
He congratulated the party on an impressive campaign and election result for what they hoped would become a fourth term government, acknowledging they would be the strongest opposition New Zealand has ever seen.
While Ms Ardern was not given the good news in advance Mr English was also not given a heads up of his defeat.
His wife Mary and sons Connor and Xavier - two of six siblings - were seen arriving ahead of the announcement to offer support.
Mr Peters said the decision was owed first to the New Zealand people.
"With respect the people of this country are the ones who deserve to know first," he said, through he conceded "that would be the nice thing to do".
NZ First made the decision based on how to best mitigate, not worsen, what New Zealand is expected to face in the coming years, Mr Peters said.
"Maybe this has galvanised them, hearing each other's stories and knowing they are not alone," say the nurses behind the Facebook group, New Zealand, please hear our voice.