The election has delivered sweet redemption and an astonishing result for National leader Bill English, but his fate as Prime Minister will be at the mercy of kingmaker, NZ First leader Winston Peters.
National secured 46 per cent of the vote on the election day count - just short of being able to govern on its own or with just the Act Party's David Seymour.
It would need NZ First's nine seats.
Labour leader Jacinda Ardern took her party to about 36 per cent - its highest result since the 2005 election. It was not as high as Labour had hoped when it set out to try to mobilise youth voters - something Ardern acknowledged last night.
Although Labour was well short of National, it would get 45 seats and Ardern could also form a government with the Green Party and NZ First on the initial provisional results - but only just. Between them they would get 61 seats - a slim one seat majority.
That could mean final negotiations are held off until the special votes are counted and the final results declared in a fortnight.
She said she had called English to acknowledge he got a higher share of the vote, but not to concede.
"The final outcome of tonight's election won't be decided by us. It will be decided by MMP...I simply cannot predict at this point what decisions other leaders will make."
Last night, Peters said he would not rush to make any decisions but promised to act in the national interest.
"We have not got all the cards, but we do have the main cards. We are not going to squander that opportunity."
National's massive result gives it a strong mandate for those first talks - and English was quick to point that out in his election night speech.
"We don't need to rush this process, but equally with the strong result of the National Party- with a much larger number of seats than our rivals - the indication New Zealanders have given of support for the direction this country has taken ... it is important we are able to move reasonably quickly to form a strong, stable government."
Peters will now have to decide whether he wishes to be the only other party in government with a very strong National Party, or share power with the Greens in a Labour-led Government. He is likely to talk to National first, and English said contact would be made on Sunday or Monday.
Although there is some bad blood between Peters and National, English is experienced in dealing with coalition negotiations and in the past Peters has been no fan of the Green Party and blocked it out of a Labour Government in 2005.
Ardern's feat in hauling Labour up from its 25 per cent result in 2014 to 36 per cent was short of what she and her supporters had hoped for, but the effect she had on Labour's poll results will be more than enough to ensure her ongoing leadership after the election even if Labour remains in Opposition.
But last night was hard-earned redemption for English, who in 2002 led National to its lowest result of 21 per cent.
He brought National home with support levels similar to those enjoyed by his predecessor John Key in 2011 and 2014. That was despite the onslaught from a more popular leader than Key faced and the fact English was fighting for a fourth term for National.
Last night English promised a future National Government would offer the changes that New Zealand voters made it clear they wanted on the environment and poverty, saying the results showed voters believed National had the energy and ideas to deliver.
English now has his own mandate to do that from the voters rather than coat-tailing on Key's.
He took a moment to revel in the result, pumping his fists in the air and saying National had won more seats than Labour and the Greens combined: "No-one expected that just three weeks ago."
It was not all good news for English - Act leader David Seymour held Epsom, but the results leave English without United Future and the Maori Party as backup support partners.
On the provisional results, Maori Party co-leader Te Ururoa Flavell lost the party's sole remaining electorate seat, Waiariki, to Labour's Tamati Coffey, meaning the Maori Party will be out of Parliament altogether after 13 years.
A teary-eyed Te Ururoa Flavell told his supporters he was disappointed.
"This is not our day. But our people have spoken. Even in Waiariki they have spoken, and I can't get away from that."
It was also a bitter-sweet night for Peters - he holds all the cards and is poised to return to government for the first time since 2008.
However, he will lose several current MPs and National's Matt King was ahead of him in the Northland seat last night - the seat he won in a 2015 byelection.
The Green Party also managed to get back into Parliament, getting 5.8 per cent after its support almost halved as a result of the fallout from former co-leader Metiria Turei's confessions of welfare fraud and the popularity of Ardern.
Green Party leader James Shaw said urged Peters to side with Labour and the Greens.
"This has been the fight of our lives. But we are still here."
The result follows the most tumultuous lead up to an election campaign in decades. The drama began when John Key stepped down last December and English was elected leader, and intensified just two months before the election.
After Turei's confession, Labour's poll results slumped and leader Andrew Little stepped down and handed over to Ardern. Ardern ruled Turei out of a Labour cabinet as her popularity rocketed - and Labour's with it. United Future leader Peter Dunne also withdrew saying he could not beat Labour's Greg O'Connor in the Ohariu seat.