The Persian Wars took place between Greece and Persia in the 5th century BCE. Persia invaded Greece in 490, leading to the Persians' defeat at Marathon, and in 480 BCE. One reason that the Greeks defeated the Persians when the Persians invaded in 480 is that the Persian army under Xerxes took so long to transport their armies to Greece that the Greeks had ample time to prepare a defense. In addition, Greece had the advantage because it was defending its own territory, and it was difficult for the Persians to transport all their troops and ships to Greece. The Greek army included hoplites, who were citizen-soldiers armed with spears and shields. In battle, they formed phalanxes. The hoplites had spears and armor that were superior to those used by the Persians, which gave them an advantage in hand-to-hand combat.
During the Persian invasion of 480, the Greek city-states coordinated their defense, with Sparta controlling the army and Athens controlling the navy. As Xerxes's forces approached Greece, the weather inflicted damage on them. When the Persians engaged with the Greeks in August of 480, a storm destroyed the Persian fleet while the Greek fleet, safe in the harbor, remained intact. The Persians defeated the Greeks at Thermopylae in central Greece, but they suffered heavy losses. The Greeks also used surprise maneuvers to defeat the Persians. They pretended to retreat but lured the Persian ships into the straits of Salamis, where they the Persians were defeated. Eventually, after the battles of Plataea and Mycale, the Persians went home. The wars between the Greeks and Persians continued for 30 more years, until the Peace of Callias in 449 BCE.