Although Heraclius's successors managed to salvage Constantinople from two Arab sieges (in 674–77 and 717), the empire of the 8th and early 9th century was rocked by the great Iconoclastic Controversy, punctuated by dynastic struggles between various factions at court.