The Battle of Thermopylae was fought between an alliance of Greek city-states, led by King Leonidas of Sparta, and the Persian Empire of Xerxes I over the course of three days, during the second Persian invasion of Greece.
Leonidas established his army at Thermopylae, expecting that the narrow pass would funnel the Persian army toward his own force. For two days, the Greeks withstood the determined attacks of their far more numerous enemy. Leonidas’ plan worked well at first, but he did not know that there was a route over the mountains to the west of Thermopylae that would allow the enemy to bypass his fortified position along the coast.
A local Greek told Xerxes about this other route and led the Persian army across it, enabling them to surround the Greeks. Much of the Greek force retreated rather than face the Persian army. An army of Spartans, Thespians and Thebans remained to fight the Persians. Leonidas and the 300 Spartans with him were all killed, along with most of their remaining allies. The Persians found and beheaded Leonidas’ corpse–an act that was considered to be a grave insult.
The brave 300 were wiped out but their sacrifice allowed the bulk of the Greek army to retreat and regroup. Xerxes’ invasion ended in failure as the Greeks won decisive victories at the Battles of Salamis and at Plataea where 10,000 Spartans avenged their king, country and brothers.
The Spartan sacrifice had not went unnoticed and was an inspiration to later generations and as the greek the poet Simonides wrote
"Go tell the Spartans, thou that passes by, that here obedient to their laws we lie"