The Lay of the Cid is, without doubt, the most important epic poem of Spanish medieval literature. As is well known, the poem narrates the heroic deeds of the Castilian nobleman, Rodrigo Díaz de Vivar, also known as El Cid Campeador (Campi Doctor in Latin sources). During his exile from Castile to Muslim territory the Cid led a small army formed by his vassals and friends, a force which was involved in numerous military engagements. Rodrigo Díaz de Vivar's exploits took place between the end of the eleventh century and the beginning of the twelfth. The poem, however, was composed some time later, possibly in the early thirteenth century, and refers only to the last twenty years of his life.
The poem is clearly a literary work rather than a historical account and thus the poet is under no obligation to adhere rigorously to the truth when narrating the deeds performed by the real Cid. However, it is no less true that, as in any other man-made creation, this literary composition is the fruit of a particular historical context, which, therefore, will be reflected directly or indirectly in the text.
In my opinion, The Lay of the Cid is a subjective description of Castilian society of the poet's time – that is to say, a society marked by the existence of the border with the Islamic world, in which war occupied a central and decisive place in the lives of individuals and communities.