Battle of Thermopylae
The Spartans were able to hold off such a large Persian army by choosing the battle field. They placed themselves in a small area between the sea and the mountains, that the Persians could not go through without being fought by the Greeks.
The Persians were able to defeat the Spartans by going through a secret path in the mountains. They were then able to fight the Spartans from the front ans rear.
The Spartans refused to escape because they wanted to show to the Persians that they weren't simply going to give up. They were going to fight because they were loyal and brave.