Cogad Gáedel re Gallaib ("The War of the Irish with the Foreigners") is a medieval Irish text that tells of the depredations of the Vikings and Uí Ímair dynasty in Ireland and the Irish king Brian Boru's great war against them, beginning with the Battle of Sulcoit in 967 and culminating in the Battle of Clontarf in 1014, in which Brian was slain but his forces were victorious. The chronicle, which compares King Brian to Augustus and Alexander the Great, was written in the early twelfth century, at least a hundred years after the events it describes. Much of the narrative is drawn from the earlier Annals of Ulster.
Based on internal evidence and on the nature of the text's allusions to Brian's great-grandson Muirchertach Ua Briain (d. 1119), it has been suggested that the work was composed sometime between 1103 and 1111. Cogad Gáedel re Gallaib has been found in three texts. These three are the Books of Leinster c. 1160 C.E., the Dublin Manuscript dated to the 14th century and the Brussels Manuscript from 1635.
The author makes extensive use of long, elaborate passages that describe and highlight the contrast between the Irish king Brian and the foreign army he wars against. Brian and his followers are described in terms of their virtue and courage, often emphasising their Christian background and piety:
But on the other side of that battle were brave, valiant champions; soldierly, active, nimble, bold, full of courage, quick, doing great deeds, pompous, beautiful, aggressive, hot, strong, swelling, bright, fresh, never weary, terrible, valiant, victorious heroes and chieftains, and champions, and brave soldiers, the men of high deeds, and honour, and renown of Erinn...
The text goes on to say that Brian and his Dál gCais are comparable to Augustus and Alexander the Great, even going on to suggest that Brian's son Murchadh "was the metaphorical Hector of all-victorious Erinn, in religion, and in valour, and in championship, in generosity, and in munificence." The text draws heavily on figures of mythology and the Bible, attributing characteristics of Hercules and Samson to Murchadh. An aspect of the work's style that is lost in translation is the heavy-handed use of alliteration. When setting the scene for the Battle of Clontarf, there is a digression to describe the armament of the Dál gCais which consists of a series of twenty-seven adjectives, grouped in strings of alliterative words.