The office, since it offered many advantages, was eagerly sought after. The excessive claims of the advocates gave rise to many disputes between them and the churches or monasteries. The bishops and abbots, who found their rights seriously curtailed, appealed to the Holy Roman Emperor and to the Pope for protection. In the twelfth century grave warnings issued from Rome, restraining the high-handed actions of the advocates under pain of severe ecclesiastical penalties, which still did not put an end to all the abuses that prevailed. On certain occasions, emperors and princes exercised the office of advocate, in which case they appointed deputy-advocates () to represent them. From the time of Charlemagne, who had such officials appointed in ecclesiastical territories not directly under the control of his counts, the was a state functionary representing ecclesiastical dignitaries (such as bishops and abbots) or institutions in secular matters, and particularly before secular courts. Such representatives had been assigned to the church since late antiquity, as it was not supposed to act for itself in worldly affairs. Therefore, in areas such as the territories of abbeys and bishoprics, which by virtue of their ecclesiastical status were free (or immune) from the secular government of the local count (, in origin an administrative official in charge of a territory and reporting to the emperor), the fulfilled the function of a protective lordship, generally commanding the military contingents of such areas (). Beyond that, he administered the high justice instead of the count from the court (, or ). In private and family monasteries (see proprietary church), the proprietor himself often also held the office of , frequently retaining it after reform of the proprietorship (see also lay abbot). The three-way struggle for control of the of the more important abbacies, played out among the central monarchy, the Church and the territorial nobility, was pretty well established as a prerogative of the nobility; the Hirsau formulary (1075) confirmed count Adalbert of Calw as hereditary advocate of the Abbey, an agreement so widely copied elsewhere in Germany that from the tenth century the office developed into an hereditary possession of the higher nobility, who frequently exploited it as a way of extending their power and territories, and in some cases took for themselves the estates and assets of the church bodies for whose protection they were supposedly responsible. In Austria, the teaching of the Church that,