LONDON — A British man who took his daughter out of school without permission to visit Disney World in Florida broke the law and must pay a penalty, the British Supreme Court ruled on Thursday.

The case has been heavily debated in Britain, pitting as it did the rights of parents to raise their children as they see fit against stiff truancy laws in a nation where school attendance is compulsory.

The father, Jon Platt, had argued that the government’s case represented a vast overreach by the “nanny state.”

“You are not the final arbiter of what’s right for your child,” he said.

The Supreme Court’s 18-page ruling overturned two lower courts’ decisions in favor of Mr. Platt, finding that he had no right to take his daughter out of school without a valid reason, such as illness.