By the seventh century the Irish had developed a national consciousness, the result of sharing a single language, culture, law and origin-legend from earliest known times. Ireland was conceived of as a single entity with a political dimension expressed in terms of a pseudohistorical high kingship of Ireland that was projected into the distant past and placed atop the fragmented pyramid of kingship actually existing at that time. By the eleventh century the myriad tribal kingships of the seventh century survived only as antiquarian titles, their substance long subsumed within territorial lordships held under a handful of regional kingships held by dynastic segments coextensive with a single extended family. Irish kingship was rapidly converging upon the pseudohistorical ideal of the high kingship and the express object of the three contending dynasts (O Brien of Munster, MacLochlainn of The North and O Connor of Connacht) was to extend their rule across the entire island and to confine succession to a national kingship within the limits of their own extended family. This heightened contention caused many of the historical sources of the period to describe these kings as ríg Érenn co fressabra ('kings of Ireland with opposition') but we should be careful to recognise that these kings are being compared somewhat unfairly with the imagined high kings of an idealised past and that Ireland as a kingdom lacking a settled monarchy in which the individual was subject to intermediate private jurisdiction lay firmly within medieval European norms of statehood.
The annals disclose that the MacLochlainn dynasty was founded by Ardghal the son of Lochlainn. Ardghal had been expelled from Tullaghoge in 1051 yet recovered to become ruler of Aileach by the time of his death in 1064. His son Domhnall became ruler of Aileach in 1083 and king of Ireland with opposition in 1090. Domhnall took advantage of a decline in the fortunes of the Clann Domhnaill dynasty to move north and seize Inishowen, moving his base to the religious foundation of Derry around 1100. He engaged his national rivals the O Brien dynasty of Munster militarily, using marriage alliances to his advantage, while safeguarding his regional position by imposing his son Niall as ruler of Tír Conaill and by dividing Ulaid into several discrete lordships. As king he memorialised the alliance of Church and state by commissioning a religious reliquary known as the Shrine of Saint Patrick's Bell (pictured above) and eventually died in Derry in 1121 aged seventy three. His son Niall predeceased him, having been killed by regional rivals in 1119, leaving another son Conor to succeed him as ruler of Aileach. Except for a short period in 1128 when supplanted by his brother Maghnus, Conor remained as ruler until his death (also at the hands of regional rivals) in 1136. Muircheartach the son of Niall succeeded Conor as ruler of Aileach and became king of Ireland with opposition in 1149. He engaged his national rivals the O Connor dynasty of Connacht militarily until they submitted to his authority. As king he issued charters to religious foundations, commissioned the royal propaganda tract The Circuit of Ireland by Muircheartach son of Niall and promoted the religious order of Saint Colmcille. He also remodelled the burgeoning secular settlement at Derry to allow the enclosure of the religious foundation lying at its heart and to facilitate the construction of its first cathedral. As his grandfather had done he sought to consolidate his regional position by dividing Ulaid into several discrete lordships but this was to prove his undoing. In 1166 he was killed by his former allies after blinding the ruler of Ulaid in violation of an agreement guaranteeing his protection.
Muircheartach was succeeded as king of Ireland by Ruairí O Connor who immediately moved to undermine MacLochlainn supremacy in the north by dividing Tír nEoghain in two and granting the southern portion to their regional rivals the O Neills. The rulership was subsequently disputed between MacLochlainn and O Neill as reflected in the fourteenth century retrospective topographical poem of Seán Mór Ó Dubhagáin:
Uí Néill ríoghdha an ratha truim
Agus Méig laomsgoir Lachluinn
Dual don mhaicne gan mhíne
Dá aicme na hairdríghe
'Kingly O Neill of great fortune
And the very proud MacLochlainns
A lineage without natural tameness
Two families of the rulership'
The effects of this were to be far reaching. With the MacLochlainns preoccupied in the north Diarmaid MacMurchada (who held Leinster from Muircheartach) protected his local position by hiring Norman auxiliaries from England and Wales. This led to the direct intervention of Henry II king of England in 1171, the abdication of Ruairí O Connor in 1175 and to the long interference of England in Irish affairs. The Aileach dynasties stood alone in showing no disposition to accept Henry II as their overlord. Four sons of Muircheartach (Conor, Niall, Maelsechnaill and Muircheartach) and a collateral named Domhnall ruled Tír nEoghain between 1167 and 1196. Maelsechnaill forced the Anglo-Normans to abandon their castles across a large area of Meath in 1176 but in 1177 Ulaid fell to the Anglo-Norman freebooter John de Courcy who created an Anglo-Norman earldom of Ulster in its place. The MacLochlainns initially attacked into the earldom and Domhnall inflicted a defeat upon its forces in 1188 but thereafter allied themselves with de Courcy (to whom they were related through the Norse kings of Mann and the Isles) against their regional rivals until de Courcy was expelled from the earldom by John king of England in 1205. In the next generation Conor the son of Muircheartach seized the rulership of Tír nEoghain from O Neill in 1201 but was killed soon afterwards. After a long period of uninterrupted O Neill rule his brother Domhnall ruled intermittently from 1232 onwards (being removed in favour of O Neill by the Anglo-Normans in 1238) but his defeat by the combined forces of O Neill and his ally O Donnell of Tír Conaill at the battle of Cameirge in 1241 proved to be a watershed. With the MacLochlainn family virtually extinguished the O Neill and O Donnell families proceeded to rule in the north until the English conquest of the seventeenth century.