a difficult retreat along the Tigris. With the Roman army stuck on the eastern bank of the Euphrates, Julian's successor Jovian made peace, agreeing to major concessions in exchange for safe passage out of Sasanian territory. The Romans surrendered their former possessions east of the Tigris, as well as Nisibis and Singara, and Shapur soon conquered Armenia, abandoned by the Romans. In 383 or 384 Armenia again became a bone of contention between the Roman and the Sasanian empires, but hostilities did not occur. With both empires preoccupied by barbarian threats from the north, in 384 or 387, a definitive peace treaty was signed by Shapur III and Theodosius I dividing Armenia between the two states. Meanwhile, the northern territories of the Roman Empire were invaded by Germanic, Alanic, and Hunnic peoples, while Persia's northern borders were threatened first by a number of Hunnic peoples and then by the Hephthalites. With both empires preoccupied by these threats, a largely peaceful period followed, interrupted only by two brief wars, the first in 421–422 after Bahram V persecuted high-ranking Persian officials who had converted to Christianity, and the second in 440, when Yazdegerd II raided Roman Armenia. Byzantine–Sasanian wars Anastasian War The Anastasian War ended the longest period of peace the two powers ever enjoyed. War broke out when the Persian King Kavadh I attempted to gain financial support by force from the Byzantine Emperor Anastasius I; the emperor refused to provide it and the Persian king tried to take it by force. In 502 AD, he quickly captured the unprepared city of Theodosiopolis and besieged the fortress-city of Amida through the autumn and winter (502–503). The siege of the fortress-city proved to be far more difficult than Kavadh expected; the defenders repelled the Persian assaults for three months before they were beaten. In 503, the Romans attempted an ultimately unsuccessful siege of the Persian-held Amida while Kavadh invaded Osroene and laid siege to Edessa with the same results. Finally in 504, the Romans gained control through the renewed investment of Amida, which led to the fall of the city. That year an armistice was reached as a result of an invasion of Armenia by the Huns from the Caucasus. Although the two powers negotiated, it was not until November 506 that a treaty was agreed to. In 505, Anastasius ordered the building of a great fortified city at Dara. At the