New Zealand's conservative National Party is facing a resurgent opposition in an election race which is turning out to be much closer than predicted.
Just three weeks ago, victory seemed assured for the governing party but much has changed since then due to the rise of opposition leader Jacinda Ardern with the latest polls indicating a tight race.
The latest twist came on Monday, when United Future leader Peter Dunne resigned, the third party leader to quit in as many weeks.
His small party supported the government and his move came as a blow to prime minister Bill English.
Mr Dunne said there was a mood for change in the district where he has served as a representative for 33 years, something that has become apparent to him only in recent weeks.
"In New Zealand all of us, me included, took the view that after Brexit, after (Donald) Trump, this wouldn't happen here," Mr Dunne said.
"But actually, it's the same mood."
Although Mr Dunne was United Future's only representative, his party was one of several minor parties that helped the government reach a ruling majority.
Mr English is campaigning on his party's economic success, pointing to solid GDP growth, strong employment numbers and budget surpluses.
His party had turned his somewhat dull image into a positive, portraying him as steady and dependable.
He told reporters Mr Dunne's exit highlighted that the election was becoming a drag race between the two main parties, with the minor parties falling away.
The campaign was transformed three weeks ago when opposition leader Andrew Little quit following dismal polling, allowing Ms Ardern to step into the position.
The 37-year-old's promise to run a progressive agenda with an optimistic outlook resonated with some voters.
Opinion polls show a sharp rise in popularity for her Labour Party.
A week after her appointment, Green Party co-leader Metiria Turei resigned, after admitting she committed welfare fraud as a struggling young mother more than 20 years ago.
She made the admission as part of an effort to energise debate about the difficulties of living on welfare.
But the move appeared to backfire, with the Green Party dropping in opinion polls.
Part of that may have been due to liberal voters switching to the Labour Party.
Mr Dunne struck a distinctive figure in Parliament with his favoured bow ties and white hair.
He cast himself as a moderate who was willing to work with parties from either side of the aisle.
His party won eight seats in the 2002 election, but its fortunes waned after that.
Mr Dunne continued to hold senior roles in the government and is minister of internal affairs.
He said he thought Ms Ardern was a "perfectly pleasant and capable person" but that Mr English had the experience, judgment and depth to lead the country.