Labour's finance spokesperson for six years, Grant Robertson leaves politics with a contested legacy.
Robertson grew up in Dunedin and studied politics at Otago University, where he will take over the top job as Vice Chancellor after leaving Parliament in March.
He graduated with a BA (Hons) in 1995, and was a staunch student politician - having been president of the school's Students' Association and co-president of the national body.
For a time he worked for the Ministry of Foreign Affairs and Trade, including managing the New Zealand aid programme to Samoa and being posted to the United Nations in New York. He also worked as an advisor to then prime minister Helen Clark.
Robertson first entered Parliament in 2008 as the MP for Wellington after the previous MP, Labour's Marian Hobbs, announced her retirement.
He defeated National candidate Stephen Franks by 1904 votes, and he continued to hold the electorate - increasing his vote margin each time - until his decision not to contest it at last year's election.
A rising star in Labour's ranks when the party was in opposition, Robertson was appointed spokesperson for state services by Phil Goff, later taking on tertiary education and being elevated to 20th when Chris Carter was demoted and put on leave for misuse of credit cards.
It put Robertson higher in the rankings than any other MP from the 2008 intake.
When David Shearer took over the party leadership in late 2011, Robertson became his deputy and remained in the role for about 21 months until September 2013. With Shearer having resigned as leader the previous month, Robertson put his name forward for the leadership but was defeated by David Cunliffe.
He ran again for the leadership after Cunliffe's disastrous election defeat in 2014, but lost to Andrew Little.
In government, Robertson has at times been the deputy prime minister and leader of the House and held a total 10 ministerial positions - with sport being a particular area of interest.
It's likely, however, he will be most remembered as the Finance Minister during Labour's six years in government - first as Jacinda Ardern's money man, then Chris Hipkins'.
His first Budget in 2018 was described as "cautious" and "restrained", sticking to the responsibility rules Labour and the Greens proposed during the previous year's election campaign. Those who had backed Labour expressed disappointment about a lack of spending on shoring up the public services the party said had been "neglected" under National.
The next one, in 2019, was notable for Robertson's decision to roll out a new approach to spending. The "Wellbeing" Budget required ministers and departments to work more closely together, with spending decisions considered through a lens of long-term, intergenerational benefit.
If that approach was aspirational, the 2020 Budget was reactive: the emergence of the Covid-19 pandemic had forced him to scrap his plans and start again with just a few months .
Forecasts of unemployment soaring above 9 percent and a slow return to growth saw him use the $13 billion that had been built up in surpluses since taking office and borrow heavily - spending up large sums on schemes to safeguard jobs and businesses, stimulate the economy, and continue building houses.
"Today is about jobs. It's about creating new jobs and it's about preparing people for new jobs," Robertson said.
As it happened, unemployment peaked at just 5.2 percent in September that year.
Labour was rewarded for its pandemic response in the 2020 election, winning the largest ever vote for a single party since New Zealand switched to MMP, and with more than 54 percent the vote was the first and only single-party majority government.
Ardern, despite having named Kelvin Davis as deputy leader of the party, appointed Robertson as her deputy prime minister - making him the first openly gay man to hold the role.
With the economy having rebound faster than expected, Robertson's next couple of budgets continued to spend on topics close to Labour's heart: benefit increases in 2021; education and health infrastructure, and climate spending in 2022.
By then, the challenge presented by rising inflation had grown, but the 2022 "cost-of-living payment" scheme proved politically problematic with National calling it a "short-term sugar hit". The problematic rollout of the scheme, which saw funds given in some cases to dead people and foreigners, only added fuel to the fire.
The opposition continued to attack Labour over the cost of living, National's Christopher Luxon leading the charge and making it his top priority.
Ardern resigned in 2023, saying she did not have "enough in the tank" to ably lead the country through another election and whichever crises arose.
Robertson was a top contender to replace her, but soon ruled himself out. Hipkins was selected to take over instead, and Robertson handed the deputy prime minister role to Carmel Sepuloni to focus on Finance.
Within weeks, however, the first crisis of the new regime hit: the Auckland anniversary floods and Cyclone Gabrielle, prompting Robertson to undertake his second Budget rewrite, again splashing cash on recovery.
He also chose not to contest his Wellington seat, supporting Labour's Ibrahim Omer to take over - though Omer was ultimately beaten by young Green Party city councillor Tamatha Paul.
Although Hipkins' entry as PM saw a brief boost in polling for Labour, National ultimately won the 2023 election - thanks in no small part, no doubt, to that heavy focus on the economy and the cost of living.
Facing the prospect of years in opposition - having already been through nine of them - Robertson is now set to exit politics in a month or so, his legacy a target for his political opponents. Whether they are right will be for history to judge.