section_path: History/Formation and expansion/540s BC
section_name: 540s BC
paragraph_text: 540s BC
  
  King Croesus of Lydia sought to take advantage of the new international situation by advancing into what had previously been Median territory in Asia Minor. Cyrus led a counterattack which not only fought off Croesus' armies, but also led to the capture of Sardis and the fall of the Lydian Kingdom in 546 BC. Cyrus placed Pactyes in charge of collecting tribute in Lydia and left, but once Cyrus had left Pactyes instigated a rebellion against Cyrus. Cyrus sent the Median general Mazares to deal with the rebellion, and Pactyes was captured. Mazares, and after his death Harpagus, set about reducing all the cities which had taken part in the rebellion. The subjugation of Lydia took about four years in total.
  
  When the power in Ecbatana changed hands from the Medes to the Persians, many tributaries to the Median Empire believed their situation had changed and revolted against Cyrus. This forced Cyrus to fight wars against Bactria and the nomadic Saka in Central Asia. During these wars, Cyrus established several garrison towns in Central Asia, including the Cyropolis.