Formerly, the Lydians and Medes had arranged that the natural boundary between the two empires would be the Halys River. Croesus learned of the sudden Persian uprising and defeat of his longtime rivals, the Medes. He attempted to opportunistically use these set of events to expand his borders upon the eastern frontier of Lydia.