The sovereignty of the Holy See was retained despite multiple sacks of Rome during the Early Middle Ages. Yet, relations with the Kingdom of Italy and the Holy Roman Empire were at times strained, reaching from the ''Diploma Ottonianum'' and ''Libellus de imperatoria potestate in urbe Roma'' regarding the "Patrimony of Saint Peter" in the 10th century, to the Investiture Controversy in 1076–1122, and settled again by the Concordat of Worms in 1122. The exiled Avignon Papacy during 1309–1376 also put a strain on the Papacy, which however finally returned to Rome. Pope Innocent X was critical of the Peace of Westphalia in 1648 as it weakened the authority of the Holy See throughout much of Europe. Following the French Revolution, the Papal States were briefly occupied as the "Roman Republic" from 1798 to 1799 as a sister republic of the First French Empire under Napoleon, before their territory was reestablished.