In 480 BC, King Leonidas of Sparta was the commander of a small army intended to delay the Persian advance towards Athens, while the rest of the Greeks formed their army. He chose the pass at Thermopylae as his site and move his troops into place. http://www.thevines.com/leaf/AB000001831...
Leonidas is generally acknowledged to have fought this battle with the 300 Spartans of his personal bodyguard, but this is not quite correct. His force was composed of hoplites from several kingdoms and numbered about 7,100. About 1000 of these were Phokians, whose assignment was to guard against a flanking movement via the goat path which was the actual route eventually used by Xerxes' troops; so it's apparent that Leonidas was aware of the weakness in his defense, and had planned for it.
The 'goat path' taken by the Persians travels approximately 16 kilometers, from the Persian camp, up a branch of the Asopus River and skirts the summit of Mt.Callidromus (actually a ridge line) before descending down another river course and arriving in the rear of the Greek positions. http://www.reisenett.no/map_collection/h...
The Phokians were surprised by the attack, so they were apparently not maintaining a proper watch. Nevertheless, they held long enough for the rest of the Greek force to escape the trap, except for Leonidas and his bodyguard who upheld the Spartan creed of refusing to retreat or surrender.