The empire was threatened by the Saracens both by land and sea, and Anastasius sent an army under Leo the Isaurian, afterwards emperor, to defend Syria; adopted wise and resolute measures for the defence of his capital; attempted to reorganize the discipline of the army; and equipped and despatched to Rhodes a formidable naval force, with orders not only to resist the approach of the enemy, but to destroy their naval stores.
The troops of the Opsikian theme, resenting the emperor's strict measures, mutinied, slew the admiral, and proclaimed Theodosius, a person of low extraction, emperor. After a six months' siege, Constantinople was taken by Theodosius; Anastasius, who had fled to Nicaea, was compelled to submit to the new emperor in 716 and retired to a monastery in Thessalonica.
In 721, Anastasius headed a revolt against Leo, who had succeeded Theodosius, and receiving a considerable amount of support, laid siege to Constantinople. The enterprise failed, and Anastasius, falling into Leo's hands, was put to death by his orders.