The Sasanians and Byzantines had kept peace since the brief Byzantine–Sasanian War of 440. The last major war between the two empires had been during the reign of Shapur II (). However, war finally erupted in 502. Bankrupted by his hiatus in 496–498/9, Kavad applied for subsidies to the Byzantine Empire, who originally had paid the Iranians voluntarily to maintain the defense of the Caucasus against attacks from the north. The Iranians seemingly saw the money as a debt due to them. But now Emperor Anastasius I () refused subsidies forcing Kavad to attempt to obtain the money by force. In 502, Kavad invaded Byzantine Armenia with a force that included Hephthalite soldiers. He captured Theodosiopolis, perhaps with local support; in any case, the city was undefended by troops and weakly fortified.