The Thermopylai Pass defence was turned by an outflanking move through the mountains. Given early advice of this, the Spartan king sent his allies off early to seek protection in friendly city walls so that they would not be ridden down by cavalry in open country when it broke through.
He continued to hold the pass with his remaining small force to let them get away and, now facing attack from the rear as well, was simply overwhelmed.