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, 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.
In contrast with the lavish praise bestowed on the Dál gCais, the text describes the Vikings with vehemence and condemnation, though in terms no less hyperbolic:
Now on the one side of that battle were the shouting, hateful, powerful, wrestling, valiant, active, fierce-moving, dangerous, nimble, violent, furious, unscrupulous, untamable, inexorable, unsteady, cruel, barbarous, frightful, sharp, ready, huge, prepared, cunning, warlike, poisonous, murderous, hostile Danars; bold, hard-hearted Danmarkians, surly, piratical foreigners, blue-green, pagan; without reverence, without veneration, without honour, without mercy, for God or for man.
The text's censure of the foreigners elevates the Irish and Brian even further, setting up a striking difference in moral and religious character between the two groups.
The main purpose of the chronicle seems to be to eulogise Brian Boru and thereby to show that the record of achievements of Brian's Dál gCais dynasty proved that they deserved Ireland's high kingship. This was an issue because the Ua Briain sept of the Dál gCais was struggling to remain the High Kings of Ireland at the time of the chronicle's writing. It was written during the rule of Muirchertach Ua Briain and was intended to draw a parallel with his famous ancestor.
There are similarities to a part of the Icelandic Njáls saga, which was composed in about 1280. In 1954, the scholar Einar Olafur Sveinsson postulated the incorporation into Njal's saga of a slightly earlier and lost thirteenth-century Icelandic saga, Brjáns saga ("Brian's Saga"). The relations between the accounts remains a matter of debate, and all the Icelandic written sources are considerably later than the chronicle.
The chronicler of Cogad Gáedel re Gallaib depicts the Vikings as vicious barbarians and suggests that the Dubliners are like their ancestors. In short, it may have been partly an attempt to "put the Dubliners in their place."
Modern scholars consider Cogad Gáedel re Gallaib to be a piece of "brilliant propaganda" written in a "bombastic style and full of patriotic hyperbole." Although the chronicle remains a valuable source of information about the Viking Age in Ireland, its accuracy is uncertain.
It has been suggested that there may have been multiple versions of the Cogad circulating in the twelfth century.
Just as Cogad Gáedel re Gallaib drew on earlier annalistic sources, it was incorporated into later sources. Passages from Cogad were embedded in Geoffrey Keating's seventeenth century historical work Foras Feasa ar Éirinn; in turn, some of these sections were included in the work of James MacGeoghegan.
The Munster section comprises a full quarter of the Cogad in total and a third of the narrative proper. The principal characters are:
The tale then introduces the Dal Cais clan and the sons of Cennedigh, Mathgambhain and Brian Boru. The lives and politics of both brothers are outlined including their numerous interactions with the 'foreigners'. Brian Boru's military aspirations are realised when he defeats the Ulaid of Aed O'Neill to gain control over Ulster. (LXXVII) Brian Boru and his army defend Dublin against the invaders and drive them back into the sea. (CX) Finally, Brian Boru dies at the hands of the Earl Brodar whom Brian manages to fatally wound. (CXIV)