By 500 BC, the Achaemenid Empire of Persia was at its greatest extent, they controlled a vast empire stretching from Afghanistan in the East, to Egypt and Anatolia in the West. They had already conquered the Greek cities in Anatolia and were now at the borders of Greece itself. Starting in 502 BC, the Ionian cities of Anatolia began revolting against Persian rule. Two Ionian cities in mainland Greece, Athens and Eritrea, sent assistance to the rebelling Ionians in Anatolia, together this Ionian force sacked the Achaemenid regional capital at Sardis in 498 BC. The Mighty Persian Empire sent an expeditionary force to exact revenge upon the Ionians, led by Artaphernes (brother of the Persian King Darius I) and Dates, a Median general in the Persian Army. The force defeated the Ionians in Anatolia at the Battle of Ephesus (498 BC), and then sailed on to mainland Greece to punish Athens and Eretria for their support of the rebels.
The Persians burnt Eretria to the ground and sold its inhabitants into slavery (490 BC), but were then defeated by the Athenians at the battle of Marathon. In the meantime the Persians had also subjugated Macedon, a kingdom to the North of Greece and when Darius I was succeeded by his son, Xerxes I, the Persians mounted a huge invasion of Greece that, according to Herodotus, was 2 million strong. The Greeks realized that their best chance of defeating this huge invasion was at the narrow pass between the mountains and the sea at Thermopylae. This battle was popularized in the recent film, 300. The Greeks were defeated by the Persians but at such a cost in casualties that they then lacked the manpower to mount a serious invasion on the rest of Greece. In the same year, the Greek navy defeated the Persians at the Battle of Salamis, ending the Persian hope of sending reinforcements or cutting off the Greek army on their return south.