NZ First leader Winston Peters has delivered National a humiliating bloodied nose in the Northland byelection, with a majority of 4,012 votes after the counting - a massive turnabout from National's 9,000 majority just six months ago.
The final election night count gave Mr Peters 15,359 votes to 11,347 for National's Mark Osborne.
Labour's Willow Jean Prime got 1,315 - well down on the 9,000 she got last September as Labour voters clearly voted strategically for Mr Peters instead.
Mr Peters said Mr Osborne had rung him to concede.
Read also: Double triumph for Winston Peters
After the vote was in, Mr Peters arrived at the Duke of Marlborough Hotel in Russell to be met by cheering supporters.
"Tonight, we must thank the people of Northland who put aside their party preferences and came out to vote for Northland," he said.
Mr Osborne said he had no regrets about his campaign, but described the loss to Peters as a "perfect storm".
"It was a byelection which came out of left field, you've got someone like Winston Peters who's got a lot of name recognition."
Check out booth by booth results for the byelection
He said National's lengthy candidate selection process meant the campaign started two or three weeks later than others and Labour voters had backed Mr Peters in droves.
Mr Osborne said he still wanted to be involved and would not rule out seeking selection again in 2017.
Mr Peters described the campaign as "gruelling", and said Mr Osborne should not get the blame for National's loss, which was a result of decades of political neglect Mr Osborne had nothing to do with.
National's campaign director Steven Joyce gave Mr Peters credit for a good campaign, saying he got ahead early and National was unable to make up for lost ground.
"People were signalling they wanted to send a message, in [Peters'] words, and they've done that tonight. Our job is to make sure we earn the right to represent Northland again."
Read also: Old fox hands out spanking to National
Mr Joyce said National had expected it to be tight, but underestimated the extent to which Labour and Green voters would get behind Mr Peters. He said Mr Osborne had worked hard, and he hoped he did seek selection again in 2017.
Mr Osborne said he did not believe Mr Peters would be an effective MP. "We'll be looking to make sure he delivers for Northland over the next 2.5 years."
He pointed to the promises Mr Peters had made, including rail links and upgrade to Whangarei's port - promises which were much more expensive than National's $69 million bridges upgrade.
"You have our understanding and our sympathy, and no one should hold you accountable for vast neglect and political abandonment."
The mood was jubilant at the NZ First campaign night headquarters, the Duke of Marlborough Hotel in Russell.
Among those celebrating was former Labour MP Shane Jones, who is now an ambassador. His decision to attend Peters' event rather than Labour's will add to speculation he may consider a return to Parliament with NZ First.
The National Party had mounted a massive campaign effort, shipping in ministers almost daily. It also put in a big push in the final few days with a mercy dash by the Prime Minister, and phone canvassing and door-knocking to get the voters out. However, appears to have been to no avail - Peters and his Force for the North bus steamrolled National's massive party machine, completely demolishing the 9,000 vote majority former MP Mike Sabin won in the election just six months ago.
Labour leader Andrew Little, at the Labour function at the Klondike Tavern in Kawakawa, said the early results showed Northland was "sending a message to this government after years of neglect of the regions".
The byelection was prompted by the resignation of Sabin in early February after reports he was being investigated by police. That was one of the factors that bedevilled National throughout the campaign, as Peters demanded they answer questions as to how much ministers had known about the situation.
Peters' other campaign messages also appeared to resonate with voters. He focussed on claiming Northland was neglected for decades by National and it was time to "send them a message". National struggled to get their counter-message through to Northlanders. On the final day of campaigning, Key had said he still believed Osborne could pull it off if National's voters turned out.
However, reality appeared to set in on Friday - Key was already attempting to justify a loss and claiming a byelection reflected local issues rather than a wider dissatisfaction with National's government. Joyce also pointed to the low recognition factor Osborne had compared to Peters.