You are not permitted to download, save or email this image. Visit image gallery to purchase the image.
Year 12 St John's College student Lucan Battison, 16, was suspended for refusing to conform with his principal's wishes and cut his hair last month.
His family challenged the school's decision and took the case to the High Court in Wellington earlier this week.
But now Justice David Collins has ruled in his favour.
The ruling, released from the High Court in Wellington, means Mr Battison will be allowed back in school with his long hair.
Justice Collins ruled that the decision to suspend him from St John's College was unlawful and the school's rule over hair length was vague and uncertain, Newstalk reported.
The Battison family is also entitled to costs.
Mr Battison sought a judicial review after the principal and board of trustees suspended him in breach of the schools' hair rules which says students are to have "hair that is short, tidy and of natural colour Hair must be off the collar and out of the eyes. (Extremes, including plaits, dreads, and mohawks are not acceptable).''
The rebel student said he was willing to wear his hair tied in a bun.
Today, Justice Collins concluded that the conditions imposed on Mr Battison's return to the college were "unreasonable in the circumstances of this case because the hair rule does not say a student's hair must be cut to the satisfaction of the principal''.
The judge also concluded that the college's hair rule, as it is currently worded, breaches the common law requirement that rules, such as the college's hair rule, be certain.
The High Court judgement does not rule on the general lawfulness of schools having hair rules and it does not affect school uniform rules.
The judgement only relates to the circumstances of Mr Battison's case.