With just three weeks left in his role as Treasury Secretary, Gabriel Makhlouf has found himself at the centre of a storm after the National Party managed to access Budget information early through the Treasury website.
Makhlouf had referred to "hacking" and called in the Police to investigate, only for the Police to discover National had simply used the search engine and done nothing illegal.
It has sullied the end of Makhlouf's nine years in New Zealand, before he leaves to take up the top job of the Central Bank in Ireland.
The easy breach of Treasury's website and Makhlouf's flawed response will go down as his biggest mistake.
It has also overshadowed Finance Minister Grant Robertson's moment of glory – the first "wellbeing Budget".
It will have compounded the Government's frustration after Treasury miscalculated the impact Labour's Families Package would have on child poverty.
That was just three months after Labour got into office.
Makhlouf apologised and said Treasury had fallen short.
Makhlouf was born in Egypt, to a Cypriot British father and Greek Armenian mother.
Budget blunder: Makhlouf hasn't offered resignation – Robertson
PM dodges questions about Treasury's Budget bungle
His father was a UN diplomat and Makhlouf's early years were spent in countries including Bangladesh (then East Pakistan), Samoa and Ethiopia.
He was sent to boarding school in Britain at age 11, and spent much of his career in the United Kingdom.
He was a civil servant with Customs, Revenue and Treasury. He also had a role at the OECD, leading work on tax rules, including money laundering and tax havens.
He also served as private secretary to former British Prime Minister Gordon Brown when Brown was Chancellor of the Exchequer.
He moved to New Zealand in 2010, after being headhunted for the role of Deputy Secretary of the Treasury.
He told the Listener in 2012 that New Zealand had never occurred to him before the job offer, but his background made him an internationalist.
When the top job came up in 2011 he decided to stay: "I thought 'well, actually I love this place, and I love this job'."
Called Gabs by most who knew him, he was good company and had a dry wit, all of which helped smooth his entry into Wellington and political circles.
Married with one son, he became a New Zealand citizen.
He was appointed partly because he advocated innovation. He saw Treasury's job as improving living standards.
Under National, he was charged with helping ensure the country rode out the global financial crisis, and got back into surplus.
In 2016 he was appointed for a second term.
However, he and then Finance Minister Bill English were increasingly at odds over direction.
They did not agree on English's push for a "social investment" approach or Makhlouf's Living Standards Framework, which National ignored believing it was a waste of time and effort.
Makhlouf initiated the Framework to measure the impact policies would have on living standards and social issues, saying it would improve advice.
Treasury now uses it to help weigh up bids as part of the Budget process under Labour.
Sometimes Makhlouf has pushed against political masters.
He advocated raising the superannuation age, despite two of the Prime Ministers he served under – John Key and Jacinda Ardern – ruling it out.
He had also advocated for cuts to programmes such as Working for Families and student loans.
In 2012, Makhlouf caused a ruckus when he argued in favour of increasing school class sizes to allow more money to be invested in quality teaching – promoting measures such as performance-based pay.
There was an immediate revolt by the teacher unions.
The National Government, including English, initially decided to push ahead with it but failed to sell the merits of it and eventually dropped it under intense political pressure.
Makhlouf also sometimes found himself in the position of having to defend Treasury against its political masters.
That included former Prime Minister John Key in 2016 dismissing some Treasury forecasts as "a load of nonsense".
Gerry Brownlee was a serial Treasury critic – he once described a report on the Christchurch rebuild effort "the usual sort of rubbish from them".
The most recent was in May 2018, when Housing Minister Phil Twyford dismissed Treasury's KiwiBuild forecasts saying some "kids in Treasury are fresh out of university and they're completely disconnected from reality".
Makhlouf noted to Interest that he was the one who had signed off on those forecasts: "It's been a while since someone has called me a kid so I don't know whether to take it as a compliment."
Makhlouf won that one at least – Treasury's prediction KiwiBuild would take longer to gear up than Twyford expected proved correct.
At the time, Makhlouf said he was "disappointed" at Twyford's comments.
This week, Robertson used that same word about Makhlouf.