Byzantium's most pressing threats after 650 came from the Arab Muslims centered around the Umayyad Caliphate in Damascus and the Bulgars, who formed a khanate incorporating Slavs below the Danube. After the civil war producing the Umayyad rule, from about 668, Islamic armies started penetrating Asia Minor. At the same time, Caliph Muawiya formed a fleet to put his forces within striking distance of Constantinople, the Byzantine capital. In 672, Arab forces acquired a foothold at Smyrna (Izmir), on the Aegean cost of Anatolia; in 674 they took Cyzicos, a small peninsula in the Sea of Marmara, quite near the capital. With sufficient amphibious bases, an Arab army began crossing Anatolia in 674, facing no apparent opposition from the Theme armies. Upon reaching Cyzicos, their navy ferried them across to Europe, from which they invested Constantinople in siege. During the five year of siege (674-678), the city held: 1) The capital's walls were impregnable, and would remain so for the next 800 years; 2) the population identified their survival with that of the state, and saw it as a religious confrontation; 3) the Byzantines unleashed a secret weapon. Called Greek fire, its make-up is unknown. A liquid or gel of some sort, it would be shot through tubes or hurled in bundles at Arab vessels, setting them alight and destroying large numbers of them. Thus, the sea-lanes to the capital could be kept open. After five years, the Arab army returned through Asia Minor, and the fleet was destroyed in storms and battle with Greeks. Muawiya evacuated the islands, even agreeing to pay tribute to the Emperor, Constantine IV.
The next thirty-five years of political history are quite confusing. Though Constantine seemed to have won, his reign ended poorly. After defeating Muawiya, he was immediately threatened by other foreigners, the Bulgars. They were from north of the Black Sea, and had been recently displaced by the Khazars, finally arriving in Romania. In 680, the Emperor decided on a preemptive strike. The fleet ferried his troops across the Danube to battle the Bulgars. Intimidated, Bulgar chiefs withdrew their forces to their fortified encampment. Constantine IV then decided to leave his army and return to the capital. Seeing this, his forces mistook it for flight, and a portion began to do likewise. At this point, the Bulgars attacked, defeating the Byzantine remnants. After this rout, the Bulgars crossed the Danube, subjugated the Slavs in Moesia, and founded a state--the Bulgar Khanate. Finally, before dying in 685, Constantine began trying to repopulate Asia Minor, which had been ravaged from Arab raids and whose population was necessary to man the Theme armies. Justinian II next came to the throne, inaugurating extreme instability. He was a venal, offensive individual. Initially, he continued his predecessor's policy of Anatolian repopulation. Arriving in Thessaloniki with a huge army in 688, he celebrated a triumph. On the trip in and out, his forces captured large numbers of Slavs, who were forcibly transported to Asia Minor for Theme duty.
Seven years later he was deposed by Leontius and exiled to the Crimea. Leontius however, was incompetent, stewarding the Empire during the Arab conquest of the Carthage exarchate in 697-8. The fleet he sent to relieve the city instead overthrew him, setting up Tiberius II on the Byzantine throne. At this point, Justinian II reentered the scene. Hearing that Tiberius wanted him executed, he fled to the Khazar king, who took him in and gave the ex-emperor a princess in marriage. When Tiberius tried extraditing him, he fled to Russia. By 704 he was at the Danube. Negotiating with the Bulgars, he convinced them that his appearance in the capital's vicinity would cause a popular uprising allowing him to take the throne and provide them with huge sums of tribute. In 705, the Bulgars laid siege to the city, during which Justinian was able to slip in to the city through a sewer, causing panic and Tiberius' flight. He reigned in a blood thirsty frenzy for the next eight years, during which the Bulgars rampaged through the outskirts of the city, though they were unable to break through the walls. Finally, the Opsikion Theme army arrived, ostensibly to defeat the Bulgars. But the Theme's general, Bardanes, instead overthrew the Emperor, installing Anastasius II, who was in turn deposed by Theodosius II in 715.
Arab armies took advantage of this political instability. From 706, forces began penetrating Asia Minor again, concentrating on capturing Byzantine peasants and deporting them to Syria, depriving Theme armies of manpower. Around 715, Anastasius learned through spies that the Caliph was planning a new siege. He improved the walls and began to fill royal granaries, before being deposed by Theodosius. At this point defensive preparations stopped, and Sulayman, the new caliph, decided to act. In 716 he moved out, entering the Anatolikon Theme. Its general, Leo the Isuarian, revolted against the Emperor and marched on the capital; the Arab army did not pursue him immediately. Only after Leo assumed power did the Arab army come west, beginning a siege in 717. There has been suspicion, particularly by chroniclers, that Leo had convinced the Arabs he was in league with them, getting them to put off the siege. He was familiar with their culture, and knew Arabic. When they arrived, they harvested all of the crops near Constantinople, and then burnt the surplus, to deny Greeks access. This was a mistake. The Emperor did not surrender, and the winter proved exceedingly harsh. Beginning to die from famine, the Arabs arranged for a relief fleet in the spring. Rowed by Christian slaves, it mutinied and went over to the Greeks upon arrival in the Marmara. In the summer, Bulgars and Slavs felt they were about to miss a great pillaging of the capital, and so fell upon the siege-wearied Arabs, decimating their ranks. In the fall of 718, the Caliph called off the siege. Most of his navy was destroyed on the return to Islamic lands. This would be the last Muslim siege of Constantinople until the 1300s. It did not end Arab depredations in Anatolia however, as the Caliphate's legitimacy rested on raiding the infidel. Clashes started again in 726: every summer, Leo II's forces would fight the Caliph's in eastern districts. To make forces more efficient and to lessen the possibility of being unseated by a general, Leo split the Anatolikon Theme into two.
During Leo II on the throne, the dominant religio-political controversy of 730- 840 began. It was called iconoclasm. In the evolving practice of Eastern Orthodox Christianity, pictorial or sculptural representations of important religious figures--Christ, Mary, and various saints acting out aspects of sacred history -- were prevalent in churches, monasteries, houses and palaces. They were meant to vivify history and express to illiterate Christians the bases of the faith. But in some instances these images became more than visual aids, and were worshipped in their own right. Such image worship caused a reaction. First seen in the early 720s in the Umayyad caliphate, the authorities took legal action against Christian use of icons. In 726, the drama moved to the Byzantine side of the border. The Bishop of Asia Minor convinced Leo to outlaw icons, and he inaugurated his policy of iconoclasm by tearing down a gigantic representation of Christ over the entryway to his palace. A riot ensued, accompanied by an attempt to unseat the emperor. Surviving the urban hostilities, in 730, Leo published his first Iconoclasm Decree. The decree was popular among the Asia Minor Greeks and Armenians, including large segments of the Theme armies. The iconodules--those supporting the use of icons--included the Greeks on the fringes of Thrace, as well as women, Anatolian and Thracian monks, and the Byzantine outposts of Italy. The Papacy, though not iconodule in its practices, opposed the policy of destruction of sacred images, and the controversy worsened relations between the Western and Eastern churches, explaining in part the Pope's alliance with the Carolingians.
Leo ruled until 741, dealing with Bulgar invasions the entire time, as well as Lombards chipping away at Italian possessions. On Leo's death, Constantine V came to power, and immediately faced an iconodule-motivated revolt. He thus lightened the iconoclast ordinances until 754, when an Emperor-dominated 'Ecumenical' Council passed iconoclastic resolutions, opening the way for the most virulent period of the campaign against icon use. Targeted most frequently were Asia Minor monks. The most militant iconodules, their lands were frequently confiscated, and given to Theme commanders. At the same time, Constantine scored military successes against the Bulgar Khanate, holding them back in nine campaigns. As well, he defeated Arab flotillas and was able to reclaim small territories in Syria. Still, in 751, the Lombards took the exarchate of Ravenna. In the same year, the Ummayad caliphate of Damascus fell, and its replacement, the Abbasids, had more of an eastern focus, moving the capital to Baghdad. This gave the Byzantines somewhat of a breathing space.