A father has lost a landmark legal battle at the UK's highest court over taking his daughter to Disney World during school term time.
Five justices at the Supreme Court unanimously allowed an appeal by education chiefs against an earlier ruling that Jon Platt had not acted unlawfully.
Mr Platt, who took his daughter on a seven-day family trip to Florida in April 2015 without the school's permission, was prosecuted by Isle of Wight Council after he refused to pay a £120 penalty.
But local magistrates found there was no case to answer.
Two High Court judges in London later upheld the magistrates' decision, declaring Mr Platt was not acting unlawfully because his daughter had a good overall attendance record of over 90%.
They said the magistrates were entitled to take into account the "wider picture" of the child's attendance record outside of the dates she was absent on the holiday.
In an action closely watched by schools and parents all over the country, the council urged the Supreme Court to overturn the High Court decision, saying it raised important issues over what constitutes ''regular attendance'' at school.
The justices ruled in the council's favour on Thursday.
The High Court had cleared Mr Platt of failing to ensure his daughter attended school regularly, as required by section 444 (1) of the Education Act 1996.
The panel of Supreme Court justices, including the court's president Lord Neuberger, declared that Parliament's intention was that the word "regularly" means "in accordance with the rules prescribed by the school".
Mr Platt's case now has to return to the magistrates' court as a result of the decision.
Speaking after the ruling was given, Mr Platt said he was "not at all surprised" at the judgment.
He said: "I'm pleased that they acknowledged the judgment doesn't go on to say what the school rules should be. Schools need to think very carefully about what these rules should be.
"Some have policies that mean that every day missed is a criminal offence."
He added that schools need to build in some flexibility to "attenuate the shocking outcome of this case".
The justices ruled the penalty notice was properly issued to Mr Platt.
They said he will be guilty of the offence unless he can establish one of the statutory exceptions, which include sickness and religious observance, adding " but the eventual outcome of the case will be a matter for the magistrates to decide".
Announcing the decision of the court, deputy president Lady Hale said the case "depends upon the meaning of the word 'regularly'" in Section 444 (1).
The court ruled the correct interpretation was being "in accordance with the attendance rules".
Lady Hale said there were "good policy reasons" for such an interpretation, saying: "Unauthorised absences have a disruptive effect, not only on the education of the individual child, but also on the work of other pupils, and of their teachers.
"If one pupil can be taken out whenever it suits the parent, then so can others.
"Different pupils may be taken out at different times, multiplying the disruptive effect."
She added: "Any educational system expects people to keep the rules.
"Not to do so is unfair to those obedient parents who do keep the rules, whatever the cost or inconvenience to themselves."
Mr Platt said he had "no intention" of pleading guilty when the case goes back to magistrates' court.
Speaking outside the Supreme Court he said the ruling means the state is taking away the rights of parents to make decisions for their children.
"You can no longer make the decision to take the child out of school without permission of the state," he said.
But he added, while the legal case is over, the matter is not finished and urged parents who find the ruling "utterly shocking" to show their displeasure in local elections next month.
Lady Hale emphasised that the case was not about what the rules should be "or how much discretion the headteacher should have to authorise absence".
She added: "That is a matter for the appropriate authorities."
A Department for Education spokesman said: "We are pleased the Supreme Court unanimously agreed with our position - that no child should be taken out of school without good reason. As before, headteachers have the ability to decide when exceptional circumstances allow for a child to be absent but today's ruling removes the uncertainty for schools and local authorities that was created by the previous judgment.
"The evidence shows every extra day of school missed can affect a pupil's chances of achieving good GCSEs, which has a lasting effect on their life chances
"We will examine the judgment carefully and will update schools and local authorities as soon as possible so they are clear what the judgment means for them."
Isle of Wight Council said in a statement: "The Supreme Court's judgment provides much needed clarity about what constitutes regular attendance at school, to schools, parents and local education authorities.
"The Isle of Wight Council will ensure it continues to apply its code of conduct in relation to school absence and in accordance with this judgment."