Prior to the Battle of Marathon the Athenians prayed to the gods to bring them victory in battle. They promised to sacrifice one goat for each Persian soldier slain in battle if they were victorious.
After the battle was won, the Athenians were very meticulous about counting the dead because they wanted to make sure to honor their promise. When the count was complete, the tally was 6,500 dead Persians against 192 Athenians killed. Shocked by the shear scale of their victory, the Athenians realized that they did not have 6,500 goats available so they decided to sacrifice 500 goats per year for thirteen years in order to meet their commitment to the gods.