After a cliff-hanger campaign, National leader Bill English ended election night saying he would open discussions with New Zealand First on forming a strong and stable government.
Tonight's preliminary results show National on 46 percent, Labour on 35.8 percent, NZ First on 7.5 percent and the Green Party on 5.9 percent. However, the special votes have not yet been counted, and these results could change.
Labour leader Jacinda Ardern said she had not done as well as she would have liked, but hinted that she had not given up on forming a government.
Winston Peters said the "balance of political responsibility" rested with New Zealand First.
The ACT Party leader, David Seymour, comfortably held on to the Epsom seat, guaranteeing him a return to Parliament.
But Labour has taken all the Māori seats - spelling bad news for the Māori Party after its leader Te Ururoa Flavell appears to have lost the party's must-win seat of Waiariki to Tamati Coffey.
See how election night unfolded in pictures.