The government's books have returned to surplus for the first time in seven years.
Excluding investment gains and losses, the operating surplus stood at $414 million in the year to June, compared with a deficit of $2.8 billion in the previous year.
In May's budget Treasury forecast a $684 million deficit.
Treasury said the surplus was due to a growing economy boosting the tax take, while it kept a lid on spending growth.
The deficit peaked at $18.4 billion in 2011, and Finance Minister Bill English said returning to surplus was a significant milestone.
Mr English was coy about future surpluses, pointing out the risks to the economy from lower dairy prices and weak inflation.
But he said the government was committed to keeping spending under control, and his focus was on reducing debt over the medium term given ongoing economic uncertainty globally.
Prime Minister John Key said his government had kept spending at a very modest level since it took power.
"The government - and the people of New Zealand, I think collectively - have worked very hard over the last seven years to get the books back into order. It's a very positive thing that the country is now earning more than it is spending, and as a National government we will be working very hard to make sure we stay in surplus."
But the Green Party said the Government's narrow surplus had come at the cost of the things that matter to New Zealanders.
Finance spokesperson Julie-Anne-Genter said the surplus was a distraction.
"National still isn't making progress on the critically important issues facing New Zealand, like reducing child poverty and reducing carbon pollution so we can respond to climate change. So we certainly think they could have made much more progress in these areas with better financial management, and still achieve surplus."
And the Labour Party said the surplus paled into insignificance against its massive debt burden. Finance spokesperson Grant Robertson said the debt levels were extraordinarily high.
"The government will be paying $13 million a day in interest - they're going to wipe out the surplus in a month's worth of interest payments on the debt. We have a government that is hugely indebted and without any real ideas or any real plan B to grow the economy so we can pay back that debt."
Robust economy
The economy grew 2.4 percent in the year to June, which Treasury said was due to robust growth in construction, household consumption and tourism.
Tax revenue rose 8 percent to $66.6 billion with higher income and corporate tax and GST.
As a share of the economy, core Crown tax revenue totaled 27.7 percent of GDP, compared with 26.3 percent last year.
Spending rose 2 percent to $72.4 billion or 30.1 percent of GDP, with most of the gain from more people getting superannuation.
The pace of growth in net debt was starting to slow, and stood at $60.6 billion, or 25.2 percent of gross domestic product.