Diego Gelmírez or Xelmírez (Latin: Didacus Gelmirici; c. 1069 – c. 1140) was the second bishop (from 1100) and first archbishop (from 1120) of the Catholic Archdiocese of Santiago de Compostela in Galicia, modern Spain.
Diego involved himself in many quarrels, ecclesiastical and secular, which were recounted in the Historia Compostelana, which covered his episcopacy from 1100 to 1139 and serves as a sort of gesta of the bishop's life.
Dalmatius died the next year (1095),shortly after returning from the Council of Clermont in which the authority of the see of Iria Flavia was transferred to Compostela, and the people of the see requested the king nominate Diego administrator again during the vacancy.
In 1110 a truce between Pedro and the brotherhood was broken when the former took over the south Galician fortress of Castrelo de Miño and installed a garrison there under his wife Urraca and the young Alfonso.
Urraca deprived him of his secular authority at the request of the people, who agitated for communal rights, but she reinstated him in his temporal powers within a year and even exempted him from all military service to the crown and extended his charge over the whole diocese.
That same year, according to the Historia, Urraca ordered the leading men (principes) of Galicia, including Arias Pérez, to do homage (hominium) to Diego Gelmírez as "their lord, their patron, their king and their prince, saving their fealty to the queen" and recognise his rule (dominio).