The Battle of Thermopylae was a heroic stand by Spartan soldiers against a larger advancing Persian force. The Spartans were able to hold off the Persians in a narrow mountain pass where only a few soldiers were needed for defense. They fought on even when defeat was inevitable, but were eventually surrounded after a traitor showed the Persians an alternative route. Three hundred Spartans remained at Thermopylae to fight the Persians in a phalanx formation and allow the other Greeks time to retreat, though they all perished in the battle.