Peter Dunne is standing down after 33 years as Ōhāriu's MP, saying voter sentiment in the electorate has shifted and there is a mood for change.
A 1 News Colmar Brunton poll released a little over a week ago showed Labour candidate Greg O'Connor, the former Police Association president, 14 points ahead, on 48 percent support compared to Mr Dunne's 34 percent.
National's Brett Hudson had garnered 14 percent, despite urging the party's supporters to vote for Mr Dunne to ensure United Future got back into Parliament.
Look back at how events unfolded here.
"I have concluded, based on recent polling, and other soundings I have been taking over the last few weeks, that, the volatility and uncertainty notwithstanding, there is now a mood amongst Ōhāriu voters for a change of MP, which is unlikely to alter," Mr Dunne said in a statement today.
"This shift in voter sentiment is quite at variance with polling and other data I have seen throughout the year, upon which I had based my earlier decision to seek re-election for a 12th term as MP for Ōhāriu."
He was "naturally extremely disappointed" after 33 years of service at the apparent change of feeling but he respected absolutely the electorate's prerogative to feel that way.
"I have therefore decided that it is time for me to stand aside, so the people of Ōhāriu can elect a new electorate MP."
"When you elect your new MP on the 23rd of September make sure you elect someone who's got your interests at heart and who understands your electorate, who's got a good track record and will serve your community well, because you deserve that."
Mr Dunne's party - alongside ACT and the Māori Party - has been a support partner of National, and the 63-year-old has been Internal Affairs Minister as well as holding associate conservation and health portfolios in the 51st Parliament.
As Associate Health Minister, Mr Dunne has been behind recent changes to New Zealand's drug laws. He argued for the removal of a range of restrictions on cannabidiol - a non-psychoactive component of cannabis - which meant doctors could prescribe products containing it without Ministry of Health approval.
His announcement today follows a change in leadership for Labour, with Andrew Little stepping down in favour of Jacinda Ardern on 1 August, and Metiria Turei's resignation as Green Party co-leader eight days later.
Politicians react to Dunne's decision
In a tweet, Prime Minister and National Party leader Bill English thanked Mr Dunne for his "contribution to strong and stable government", and said he respected his decision to retire.
National would now fight hard to win the seat, Mr English said, with National doing well in the party vote in Ōhāriu in the last three elections.
Watch a video of Mr English's news conference at Parliament:
Labour leader Jacinda Ardern thanked Mr Dunne for his service to Parliament, and said the race for the Ōhāriu seat had become interesting.
Green Party leader James Shaw said Mr Dunne had obviously looked at the way the wind was blowing and decided he did not want to end up on the opposition benches.
"So he's been reading the tea leaves... knowing there is a change of government coming up in September and deciding now is the time to bow graciously out."
Mr Shaw said Mr Dunne had a long and distinguished career as an MP and as a minister. "So I just want to say, 'Thank you for your service, Peter.'"
ACT leader David Seymour said while he wished Mr Dunne well, he described him as "a symbol and an enabler of the way our major parties drift along with no real agenda".
Mr Dunne could have fit within either National or Labour, said Mr Seymour, "exemplifying the way National and Labour are indistinguishable in office".
"Finally, he has been swept out by the tidal change against do-nothing politics."
But New Zealand First leader Winston Peters said he had no comment to make about Mr Dunne's resignation.
"I'm not interested in him, never have been."