Jubilant National leader Bill English says National will begin discussions with NZ First within days to form a "strong, stable" new government.
English is in the box seat after leading National to a triumphant result - and within touching distance of a historic fourth term for the party.
With 99 per cent of the vote counted National was on 46% - while Labour was on 35.8%, NZ First on 7.5% and the Greens on 5.8%. The Act Party will also return to Parliament after leader David Seymour won in Epsom.
In terms of seats in the House, National would have 58, Labour 45, NZ First 9, the Greens 7 and Act 1.
English told party faithful that voters had spoken and "now we have the responsibility of working to give New Zealand strong and stable government."
He noted that "just short of half of New Zealanders voted National and 10 per cent more than our nearest rivals."
However English also congratulated Labour and its leader Jacinda Ardern on its result and for the hard-fought campaign.
Earlier, Winston Peters said NZ First wouldn't rush out to make any decisions tonight until he had spoken to the full NZ First Party board.
"This party is a realistic commonsense party. We don't like extremism,'' Peters said.
"We have been strong enough and honest enough with our supporters. We don't have all the cards, but we do have the main cards.''
He said they would be making decisions based on the national interest. Peters called on the public to be patient and asked that he not be asked who they would go with.
The evening proved bitter sweet for Peters, who lost the Northland electorate to National's Matt King.
Jacinda Ardern told Labour's election night function "we gave it our all".
Ardern thanked the thousands who had worked to promote the party.
"From the bottom of my heart I thank you. I believe New Zealand's best days are ahead of us. On this night I pledge all my energies to making sure we have a future we can all be proud of... So let's keep doing this."
Green Party leader James Shaw tried to remain upbeat - and confident that Labour, the Greens and NZ First could form a new government.
"New Zealanders overwhelmingly voted for change," he said.
Meanwhile the Maori Party has been turfed our of Parliament.
Labour's Tamati Coffey - a former TV weatherman - beat Te Ururoa Flavell in Waiariki.