In the 8th century, from 701 to 800, Rome started breaking away from the Byzantine Empire. In 727 Pope Gregory II refused to accept the Emperor's decrees establishing iconoclasm. Attempts to use force did not succeed, as the Lombards protected the Pontiff. In 731, Rome was de facto made independent of the Empire, with the Lombards as the new dominant force in the area.
In 756, the Papal States were established. The Lombards tried to regain control, but in 773 they met their final defeat at the hands of Charlemagne. The century ended with the coronation of Charlemagne as Holy Roman Emperor in San Pietro in Vaticano.