were defeated, Sardis was sacked, and Gyges was killed, following which he was succeeded by his son Ardys. In 637 BCE, during the seventh regnal year of Ardys, the Thracian Treres tribe who had migrated across the Thracian Bosporus and invaded Anatolia, under their king Kobos, and in alliance with the Cimmerians and the Lycians, attacked Lydia. They defeated the Lydians again and for a second time sacked the Lydian capital of Sardis, except for its citadel. It is probable that Ardys was killed during this Cimmerian attack or was deposed in 637 BC for being unable to protect Lydia from the Cimmerian attacks, and Ardys's son and successor Sadyattes might have also been either killed during another Cimmerian attack in 653 BCE or deposed that year for his inability to successfully protect Lydia from the Cimmerian incursions. Alyattes thus succeeded his father Sadyattes amidst extreme turmoil in 635 BCE. Initial relations with the Ionians Alyattes started his reign by continuing the hostilities with the Ionian city of Miletus started by Sadyattes. Alyattes's war with Miletus consisted largely of a series of raids to capture the Milesians' harvest of grain, which were severely lacking in the Lydian core regions. These hostilities lasted until Alyattes's sixth year (c. 630 BCE), when he finally made peace with the city's tyrant Thrasybulus, and a treaty of friendship as well as one of military alliance was concluded between Lydia and Miletus whereby, since Miletus lacked auriferous and other metallurgic resources while cereals were scarce in Lydia, trade of Lydian metal in exchange of Milesian cereal was initiated to seal these treaties, according to which Miletus voluntarily provided Lydia with military auxiliaries and would profit from the Lydian control of the routes in inner Anatolia, and Lydia would gain access to the markets and maritime networks of the Milesians in the Black Sea and at Naucratis. Herodotus's account of Alyattes's illness, caused by Lydian troops' destruction of the temple Athena in Assesos, and which was cured after he heeded the Pythia and rebuilt two temples of Athena in Assesos and then made peace with Miletus, is a largely legendary account of these events which appears to not be factual. This legendary account likely arose as a result of Alyattes's offerings to the sanctuary of Delphi. Unlike with the other Greek cities of Anatolia, Alyattes always maintained very good relations with Ephesus, to whose ruling dynasty