The Gesta comitum Barcinonensium et regum Aragoniae ("Deeds of the counts of Barcelona and kings of Aragon") is a Latin chronicle composed in three stages by some monks of Santa Maria de Ripoll and recounting the reigns of the Counts of Barcelona from Wifred I (878–97) to James II (1291–1327), as late as 1299. It is the fawning history of the dynasty known as the House of Barcelona. In presenting the rulers of the county of Barcelona as the descendants of Charlemagne, the monks sought to justify their independent policy with respect to the King of France, their nominal sovereign. The Gesta is the chronological backbone.
The first composition was made between 1162 and 1184 and ended with the reign of Raymond Berengar IV (1131–62). In the late thirteenth century it was continued through the reign of James I (1213–76). An abridged version in the Catalan language was produced sometime between 1268 and 1283. The final Latin version was edited in 1303–14 and included the reigns of Peter the Great (1276–87), Alfonso the Generous (1287–91), and James II. Except for the first composition, all surviving versions are later copies, today preserved in the Arxiu de la Corona d'Aragó, in the Biblioteca de Catalunya, and in the Bibliothèque Nationale de France. A copy of one of the latter was taken to France by Pierre de Marca and published in 1688 by Étienne Baluze.