The Song of Roland, one of the earliest medieval epic poems, was written in France in about 1100. The poem is based on an incident during Charlemagne's wars against Muslims in Spain. Charlemagne puts his nephew, Count Roland, in charge of the rearguard as French knights retreat. The rearguard is attacked by a much larger Arab army, and Roland waits too long to summon Charlemagne's help.