National party candidate Jami-Lee Ross has secured a comfortable win in the Botany by-election.
However, turnout was low - about 36%, the second-lowest turnout for a by-election since 1985.
Mr Ross gained 8150 votes, or 54.6%, of the vote, preliminary results say.
The 25-year-old Auckland city councillor will signal his intention to resign from the council once the final result has been confirmed on 16 March.
Labour candidate Michael Wood came second with 4154 votes. He says he is very pleased because he increased Labour's share of the vote in the electorate from 21% to almost 28%.
Paul Young of the New Citizen Party came third with 1572 votes, or 10.5% of the vote. ACT were fourth with 671 votes.
Mr Young says the result is positive for a six-week-old party and he will be back to contest the general election later this year.
The by-election was sparked by the resignation of National MP Pansy Wong after she admitted misusing her international travel subsidy.
Of the nearly 43,000 voters enrolled for the by-election, 14,911 votes were cast. More than 700 special declaration votes were still to be counted.