By Peter Wilson*
National used the information it found on Treasury's website to set a trap - and it worked far more effectively than Simon Bridges could have imagined after Gabriel Makhlouf made his "we have been hacked" announcement.
Finance Minister Grant Robertson walked into a trap set by National when he linked the Budget "leak" to illegal hacking.
It was no such thing, and National had known it all along. A simple website search had given the Opposition details of some of the spending in yesterday's Budget.
National's leader, Simon Bridges, revealed the information just as Prime Minister Jacinda Ardern faced press gallery journalists on her way into a caucus meeting on Tuesday. She was blindsided, and it showed.
At the same time, Mr Bridges was giving a hand-on-heart assurance that National had acted "entirely appropriately" while refusing to say how it had obtained the information.
At that point, National had probably expected the usual response to a leak - condemnation of such behaviour and the announcement of an inquiry.
What it could not have expected was Treasury Secretary Gabriel Makhlouf dramatically announcing that his department's website had been systematically hacked, and that he had called in the police on the advice of the GCSB.
That was a game-changer, and Mr Robertson seized it. "We have contacted the National Party tonight to request that they do not release any further material, given that the Treasury said they have sufficient evidence that indicates the material is a result of a systematic hack and is now subject to a police investigation," he said.
The implication was obvious - National had either hacked the website or received the information from someone who had. Whoever did it, their actions were illegal.
The government had turned the tables, or so it thought. National were now the bad guys and would face the consequences.
And then, at 9am on Budget day, Mr Bridges staged the big reveal. Armed with a video presentation, he explained to media exactly how the Budget information was obtained. A simple search of the website had disclosed material prepared for release at 2pm on Budget day, a stunning security lapse.
The Treasury, four hours earlier, had issued a statement abandoning claims of hacking and saying police were no longer involved. Material that should have been secure had been uploaded in a way that delivered it to anyone who looked for it.
Mr Bridges raged about unjust smears on his party and accused Mr Makhlouf and Mr Robertson of lying. The Treasury secretary's position was untenable and Mr Robertson should resign.
He claimed Treasury had quickly discovered the huge chink in its security and had "sat on a lie" while his party was being accused of criminal behaviour.
This leaves some very big questions which have not yet been answered. If Treasury's IT people knew what had happened, why did Mr Makhlouf go public with his hacking announcement?
Was he misled by his own department, by someone who didn't want it known that a blunder had been made with the uploading? That's hard to believe, because it must have been realised that National was going to blow the whistle on the website search.
Did Mr Makhlouf make the decision to call in the police on his own? Mr Robertson says he didn't know until after the fact, but Mr Bridges rejects that. It's unthinkable, he says, that a department head would make a call like that without first informing his minister.
The way Mr Bridges sees it, the hacking was a cooked up story to smear National and take the heat off the government and the Treasury.
Mr Makhlouf is a very senior and highly experienced official. Mr Robertson has been in politics most of his working life, he knows how the system works and the pitfalls within it.
So it's also hard to believe that they would have set this up deliberately. The risks of being found out - which would have been inevitable - hugely outweighed any advantage to be gained by smearing National.
The Treasury secretary is not appointed by the government, so the State Services Commission will carry out the inquiry to find out exactly what happened.
Mr Makhlouf is not in a happy position. He is leaving soon to take up his new job as head of Ireland's Central Bank, and this controversy can do him no good. National says that if it was in power, he would be sacked.
Finance spokesperson Amy Adams also says that if she was finance minister she would have offered her resignation. There's no indication that Mr Robertson will take that route.
*Peter Wilson is a life member of Parliament's press gallery, NZPA political editor for 22 years and seven as parliamentary bureau chief for NZ Newswire.