The anonymous Historia Compostelana is based on the relation of events by a writer in the immediate circle of Diego Gelmírez, second bishop (1100–1120) then first archbishop (1120–1140) of Compostela, one of the major figures of the Middle Ages in Galicia. The narrative of the Historia Compostelana spans the years 1100 – 1139, the years of Gelmírez' tenure, in three books. Its twofold central agenda is to extol the Archbishop's doings, while establishing the foundation and rights of Santiago de Compostela, including its founding legend, which provided apostolic connections with Saint James the Great. The bishopric had been transferred from Iria Flavia to Compostela as recently as 1095.
From a Galician perspective the Historia recounts the reigns of the contemporary sovereigns of Castile: Alfonso VI (until 1109), Urraca (1109–1126) and Alfonso VII (from 1126). "A very complex work of multiple authorship, it must be used with care, for it is essentially an episcopal gesta of Diego Gelmírez, bishop and then archbishop of Santiago de Compostela, and very partisan in its commentary," is the assessment of the major historian of this period, Bernard F. Reilly.
In the context of Hispanic historiography in Latin it is unique for narrating contemporary events, utilizing documents inserted in the text, giving it great historical value.
Its title in Latin is De rebus gestis D. Didaci Gelmirez, primi Compostellani Archiepiscopi but it has been known simply as the Historia Compostelana since the 18th century.