Labour has won today's Mana by-election, retaining the seat it has held for more than 50 years, but National put up a fight and cut the majority to just over 1000 votes.
Labour candidate Kris Faafoi gained 10,397 votes against National candidate Hekia Parata's 9317, a majority of 1080.
The Green's Jan Logie ran third with 1493 and union candidate Matt McCarten was fourth with 816.
Labour had been confident of keeping the seat but it had a difficult campaign with the Greens and Mr McCarten splitting the left-wing vote in the mainly Maori and pacific Island electorate on the outskirts of Wellington.
The by-election was caused by Winnie Laban resigning from Parliament to take up a university position.
She had held the seat since 2002 and was a popular MP, retaining it in the 2008 election with a majority of 6155.
Fewer votes were cast in the by-election than in the general election, and majority comparisons are not entirely valid, but Mr Faafoi would have wanted to come in with more than just over 1000.
If the Greens and Mr McCarten had not been in the field, most of their votes would almost certainly have gone to Labour.
Mr Faafoi, a former TV journalist and press secretary to Labour leader Phil Goff, attacked government policies during the campaign, focusing on unemployment, the cost of living and the lack of pay rises among the mainly Maori and Pacific Island voters.
Mr McCarten ran a strong campaign on similar lines, using the lack of affordable housing in Mana as one of his main planks.
Ms Parata ran a flawless campaign, strongly supported by Prime Minister John Key, and her result reflected it.
National had wanted to put in a good performance after its bad loss to Labour in last year's Mt Albert by-election, and won't be disappointed with the result.