The Battle of Thermopylae was a three-day battle fought between the Greek city-states and the invading Persians duringg the Greco-Persian Wars. The battle saw the Persian emperor Xerxes I of Persia's numerically-superior army of 300,000 troops battle the Spartan king Leonidas I's much smaller army of 7,000 Greek troops at the mountain pass of Thermopylae, where the 300 Spartans under Leonidas made their valiant last stand against the Persian vanguard as the rest of the Greek army withdrew; the battle ended when the Persians found a pass around the rear of the Spartan force and annihilated it. The battle allowed for the Persians to conquer Phokis, Boeotia, and Attica, as well as to sack Athens.
The Greco-Persian Wars had started in 490 BC when the Persian emperor Darius I of Persia attempted to subject the Greek world to his rule through military conquest. The first Persian invasion was defeated at the Battle of Marathon, so Darius spent several years preparing a new invasion force. An Egyptian revolt in 486 BC prevented Darius from focusing on Greece, and Darius died while en route to Egypt; his son Xerxes I of Persia quickly crushed the Egyptians and then prepared for an invasion of Greece. He created an army of 300,000 troops, a vast fleet, and pontoon bridges over the Hellespont, and his army made slow progress through Thrace and Macedon. In the time it took for the Persians to launch their invasion, the Greek city-states prepared to face the Persian onslaught.
King Leonidas I of Sparta consulted the Oracle of Delphi, who told him that Sparta would either lose its independence or its king. Convinced that he would be leading his army to certain death, he only selected men with living sons to join him, and he and his 300 royal bodyguards formed the core of a larger coalition of Greek forces which numbered 7,000 men. They set up camp at the middle pass of Thermopylae in Malis, which would allow for them to withstand several Persian assaults, apparently without the risk of being flanked. Xerxes sent an envoy to Leonidas, and the emissary promised that the Greeks would have their freedom, given better lands, and given the title "Friends of the Persian People". Leonidas refused the terms, and the emissary then asked for him to hand over his arms; Leonidas famously responded "Come and take them." The emissary returned to Xerxes, who decided that was was inevitable.
On the fifth day after the Persian arrival at Thermopylae, Xerxes ordered 5,000 archers to fire a barrage of arrows, but the arrows were out of range and ineffective. He then sent 10,000 Medes and Cissians to assault the Greek army, but the Greeks, who stood shoulder-to-sholder in a narrow pass, established a perfect defensive formation and cut the first wave to ribbons with only three losses; Xerxes stood up from his seat three times during the first wave, shocked that the Greeks were so powerful despite their numerical inferiority. Xerxes then sent in his 10,000 elite Immortals, but they fared no better than the Medes and were also defeated.
On the second day, Xerxes sent more infantry to attack the pass, and the Greek traitor Ephialtes informed Xerxes of a mountain path around the Greek army and offered to serve as a guide. Hydarnes II and 20,000 Persian soldiers flanked the Greeks, and the rustling of oak leaves alerted the Greeks at daybreak on the third day. The Phocian rearguard of the Greek army retreated to a nearby hill to make their stand, but the Persians instead bypassed them to continue their encirclement of the main Greek force. Leonidas resolved to stay at the pass with his men even as the other Greeks fled, and 2,000 soldiers stayed behind to fight and die. Demophilus's Thespiae refused to retreat and joined Leonidas, and these brave forces stood behind to serve as a rearguard for the rest of the retreating army.
10,000 Persians charged the front of the Greek army, and the Greeks sallied forth to slay as many Persians as they could. They fought until their spears were shattered, and they then drew their short swords for close combat. Xerxes' own brothers Abrocomes and Hyperanthes fell in battle, and the Persians suffered heavy losses at the hands of the determined Greeks. The Thebans surrendered after few losses, and the Persians tore down the Phocian wall and rained arrows on the Greeks until every last one was dead. The Greeks suffered 2,000 losses, while the Persians lost 20,000 men. When the Persians recovered Leonidas' body, they beheaded and crucified him, an unusual show of disrespect from the Persians; Xerxes' rage at Leonidas casued this breach of manners.
Following the Persian victory, the Greek naval blockade at Artemisium became ineffective, leading to tactical stalemate. The Persians sacked and burned the Boeotian cities of Plataea and Thespiae before marching on the evacuated city of Athens and destroying it, and the Persians nearly conquered Greece. However, their attempt to end the Athenians at the Battle of Salamis was defeated, and, a year later, the Battle of Plataea ended the Persian invasion, saving Western civilization and democracy from destruction and autocracy.