Nicephorus deposed the Empress Irene in 802 AD and made himself emperor. He refused to pay tribute to the Islamic caliph, and therefore lost still more Roman territory to the Abbasids. On the other hand, he fought successfully for Greece against the Slavs and Bulgars, and negotiated with Charlemagne to recognize his claim to the Imperial throne. But in 811 AD Nicephorus fell into an ambush laid by the Bulgar king Krum, and was killed. (Later Krum had Nicephorus’ skull mounted in silver, and used it as a drinking-cup for the rest of his life).
Nicephorus’ brother-in-law Michael I succeeded him, but was very weak. He managed to complete the treaty with Charlemagne, and so Charlemagne was officially recognized as a Roman Emperor. Then in 813 a usurper, Leo the Armenian,who was a peasant like Leo IV, took the throne.
Fortunately for the Empire, Krum died the next year, and both the Bulgars and the Islamic Empire were occupied with civil wars for some time afterward. Leo V brought back iconoclasm, for practical reasons rather than religious ones: he was more popular as an iconoclast. Even so, in 820 one of Leo’s oldest and closest friends, Michael II, assassinated him. It seems that Michael just wanted to be Emperor himself.
Though his reign started in murder, Michael actually did a pretty good job as emperor. He made a treaty with Krum’s son Omortag, and got Omortag to help him crush a usurper, Thomas, who was backed by the Abbasid Caliph.
(Thomas’s troops surrendered after Michael’s siege forced them to eat their own rotting dead horses, and Michael punished Thomas by cutting off his hands and feet and then impaling him on a stake and leaving him there to die).
Michael then faced Islamic invasions of Crete and Sicily. Refugee soldiers from Islamic Spain invaded Crete. An army from Tunisia invaded Sicily. Both groups immediately set up their islands as centers for pirates and the slave trade, and were very successful. At some point near the end of Michael’s reign, he seems to have found some new source of money, maybe gold mines in Armenia, because suddenly there was enough money for new building projects and spectacular gifts to the Caliph.
When Michael II died in bed in 829 AD, he was the first emperor in fifty years to be succeeded peacefully. Michael’s son Theophilus took over. Theophilus was a great admirer of Islam and the Islamic Empire (and therefore a moderate iconoclast), but he ended up spending most of his reign fighting the Abbasid Caliph anyway. After some serious losses to the Caliph Mutasim in 839, Theophilus sent messengers to the Western Emperor, Louis the Pious, suggesting an alliance against the Caliph, and proposing that Theophilus’ daughter should marry Louis’ grandson. The talks went on for four years, but they never could decide to actually do anything. Mutasim attacked Constantinople again in 842, but a storm wrecked his ships. Theophilus died soon after, of dysentery, when he was only 38 years old. His widow Theodora ruled as regent for their baby son.