Darius I ordered the first Persian invasion of Greece in 490 BC. His campaign was launched to punish Athens and Eretria for supporting the Ionian Revolt and to strengthen the Achaemenid Empire’s western frontier.
The invasion unfolded in two main stages. In 492 BC, the Persian commander Mardonius reasserted Persian control over Thrace and secured Macedon as a subordinate kingdom, but a storm wrecked much of his fleet near Mount Athos. Darius then sent a new expedition under Datis and Artaphernes in 490 BC.
That force captured or subdued several Aegean islands and destroyed Eretria before landing at Marathon in Attica. The Athenians, supported by Plataea, defeated the Persians at the Battle of Marathon. The victory halted that expedition, although it did not end Persian ambitions in Greece; Xerxes I launched the much larger invasion of 480 BC.
Xerxes is therefore often confused with Darius. Xerxes led the famous later campaign involving Thermopylae and Salamis, while Darius initiated the first invasion and ordered the expedition that ended at Marathon.