Guthfrith’s son, Olaf, came forward about this time. Supported by the Norsemen of Strangford Lough he plundered Armagh, but his subsequent attacks on Ulster were checked by Muirchertach MacNeill, son of Niall Glundubh. Olaf fought in alliance with Constantine in the battle of Brunanburh (937), and after the defeat inflicted on them by Aethelstan’s forces he fled to Dublin.[24] He is probably the “Anlaf of Ireland” who was chosen King by the Northumbrians in 941,[25] but he died about a year later.[26]
Another Olaf, the famous Olaf Cuaran, also called Sihtricsson to distinguish between them, also played an important part in campaigns in Ireland and England. He went to York about 941, and was elected king by the Northumbrians, but was expelled after a few years along with Raegenald, son of Guthfrith.[27] He then took the Dublin Kingdom under his rule, and in the following year was defeated in battle by the Irish at Slaine (Co. Meath). Leaving his brother Guthfrith to govern in his stead, he departed to York, where he became king a second time; but the Northumbrians drove him out after three years and placed “Yric, son of Harald” (_i.e._, Eric Bloodaxe, late King of Norway) on the throne.[28]
Henceforward Olaf limited his activities to Ireland, where he reigned, the most famous of the Dublin Kings, for some thirty years. In 980, having summoned auxiliaries from the Scottish isles and Man, he prepared to attack the _árd-rí_, Maelsechnaill II. A fierce battle was fought between them at Tara in which the Norse armies were completely routed, Olaf’s son Raghnall being among the slain. Maelsechnaill followed up this victory by a three days’ siege of Dublin, after which he carried off a number of hostages from the Norsemen, and also obtained from them 2,000 kine, together with jewels and various other treasures.[29] Olaf himself, utterly disheartened by his defeat, went on pilgrimage to Iona, where he died soon after.
Some fifteen years before, a severe blow had been struck at the power of the Limerick Vikings under Ivarr, grandson of Ivarr and his sons. The attack made on them at Sulcoit (968) by two princes of the Dal Cais, the brothers Mathgamain and Brian, resulted in victory for the Irish, who took Limerick shortly after.[30] Mathgamain was treacherously murdered in 976, and Brian then became King of Thomond. He soon brought the Kingdoms of Ossory and Leinster under his control, and by the terms of a treaty made in 998 Maelsechnaill consented to leave Brian master of Leth Mogha (_i.e._, the southern half of Ireland). The Leinstermen under King Maelmordha, dissatisfied with this arrangement, began to make trouble and revolted, assisted by the Dublin Norsemen. An important victory was gained over their combined armies at Gleann Mama (Co. Wicklow) in the year 1000 by Brian, who after the battle captured Dublin. King Sihtric (O.N. Sigtryggr), son of Olaf Cuaran, had to submit to Brian’s authority. Having accepted his allegiance Brian married Gormflaith, mother of Sihtric and sister of Maelmordha, and at the same time gave his own daughter to Sihtric in marriage.[31]