Prime Minister John Key's belated intervention and subsequent order that major changes to funding formulas governing school class sizes be reworked has stopped an embarrassing political mess from becoming a catastrophe for National.
But it is still a mess. And one purely of National's own making.
In what was assuredly her worst day in the job, Education Minister Hekia Parata was yesterday desperately trying to sell the latest formulas determining teacher-pupil ratios variously as "good news" and "giving certainty" to parents.
This was a bit rich. Parata and the rest of the Cabinet are the ones who took certainty away in the first place.
Parata had barely put a foot wrong during her first six months in the education job, repaying the faith Key had shown in promoting her to National's front bench and giving her the very senior and demanding portfolio.
Yesterday Parata - who has been touted as a future National leader - came hurtling back down to Earth, suffering the indignity of Key trampling all over her portfolio.
It is a big lesson for Parata. Education is the kind of portfolio that when you think you have control of it, it takes control of you.
In its hunt for Budget savings, National seems to have got way ahead of public opinion on class sizes. Whatever international research may show, the public has long been told that reducing class sizes is a major help in lifting educational achievement.
It will take more than one speech by the head of the Treasury advocating bigger classes and using the savings to improve teacher performance to shift that prevailing opinion.
The original revised formula would have seen 90 per cent of schools losing or gaining one-full time equivalent teacher and 10 per cent more than one. However, some intermediate schools in that latter category could have lost as many as seven positions.
A review of the latter 10 per cent will now see those intermediate schools guaranteed their staffing entitlement will not be reduced by more than two full-time equivalents over the next three years. The subsequently revised formulas appear to be a case of Key's political instincts sensing potential trouble just in time.
National, however, is also contradicting its promise that its state sector reforms will not see front-line staff losing their jobs. You do not get more frontline than the classroom.
Staff turnover will probably mean few if any teachers will actually lose their jobs. But voters - with Opposition party help - will more likely focus on the reduction in the number of teacher positions.
What the formula changes do is propel state sector restructuring - which has largely been confined to Wellington - right into middle New Zealand's backyard.
The changes have given the education unions the chance to threaten industrial action on something where they will have public support, rather than on something such as national standards, where opinion is far more divided.
Given the disruption teacher strikes cause to working parents, the Government would likely have to buckle first.
Above all, Key and the Cabinet need to ask themselves why they agreed to the formula changes in the first place, when they know any Treasury proposal is usually devoid of any thought about the political impact.
All in all, the whole episode has been just plain dumb politically.