Image copyright Getty Images Image caption Despite the leak, the budget was presented on Thursday

New Zealand's Treasury has admitted that details of its budget - leaked earlier this week - were not stolen by hackers but accidentally made available through its website.

The government called in police after parts of its budget were released two days early by the opposition National Party.

Treasury Secretary Gabriel Makhlouf said it had been "deliberately hacked".

But on Thursday he admitted police had found no evidence of illegal activity.

"On the available information, an unknown person or persons appear to have exploited a feature in the website search tool, but ... this does not appear to be unlawful," Mr Makhlouf said in a statement.

He said the Treasury had prepared a "clone" website ahead of the budget's release on Thursday.

While the cloned site was never online, part of the information was accidentally indexed on the live website. As a result, typing in key search-terms revealed the embargoed budget details.

Mr Makhlouf maintained that there had been "deliberate, systematic and persistent searching of a website that was clearly not intended to be public," but no further police action is planned.

How did the opposition react?

A day earlier, National Party leader Simon Bridges strongly denied his party had done anything illegal and accused Jacinda Ardern's government of conducting a "witch-hunt".

"There has been no hacking under any definition of that word," he said. "They are not in control of what they are doing, so they are lashing out."

Image copyright Getty Images Image caption National Party leader Simon Bridges has called for ministers to resign

Mr Bridges has called for both Mr Makhlouf and Finance Minister Grant Robertson to resign, saying the hacking allegations were a smear campaign against his party.

Finance Minister Robertson said he was "very disappointed that the Treasury did not seek to find more information as to how this happened before referring the matter to the police".

Despite the leak, the New Zealand budget was released on Thursday as scheduled.

The government billed it as the "wellbeing budget", and said it would focus spending on areas beyond economic growth, prioritising social issues such as mental health and child poverty.