In medieval German history excommunication, when considered at all, is usually examined from the perspective of the conflicts between empire and papacy, such as that between Pope Gregory VII and King Henry IV. Like the pope, the bishops of the German Empire were armed with the power to excommunicate. Excommunication therefore figured in local, regional politics, especially in the creation of territorial principalities within the German Empire. Territorial principalities formed during the High Middle Ages when the kingship weakened, and various powerful lords, secular and spiritual, began to build states which eventually gained near-autonomous status within the empire. When a secular dynastic lord struggled to expand his dominion over land and people, he often encroached upon church lands. To defend their churches bishops could and often did excommunicate their perceived oppressors. These regional conflicts were complicated by the dual role of prince-bishops: spiritual princes of the church and secular princes of empire. In competition with the lay nobility, prince-bishops were expanding their own secular dominions.