Prime Minister Jacinda Ardern has congratulated National's Tama Potaka following his win in the Hamilton West by-election.
Ardern said she knew the campaign was going to be "tough" given the circumstances of how it came about and the timing just before Christmas.
The Prime Minister said she was "extremely proud" of Labour's candidate Georgie Dansey and her team "who ran a good, strong campaign at a difficult time".
Potaka won the Waikato seat with about 6600 votes, over 2000 more than Dansey.
National Party leader Christopher Luxon said the preliminary result - in what was historically a bellwether seat - showed people wanted change.
"Voters have sent a message to Labour that the country is heading in the wrong direction, and they need a National Government to turn it around and get things done," Luxon said in a statement.
"Everyday Kiwis are concerned about an economy going backwards, not feeling safe in their own homes or businesses, or being able to access health services - not ideological pet projects like Three Waters, the TVNZ-RNZ merger or hate speech legislation," he said.
There were 14,392 votes counted last night in the by-election, despite the electorate having 49,000 registered voters.
The 31.4 percent turnout was just under 10 percent less than that for the Tauranga by-election held earlier this year.
It was the lowest in the last four by-elections since 2016.
With RNZ