The Annals of Ulster record the effect of Viking raids on Bangor, Armagh and the churches on Lough Erne. In 839, the Vikings reached Lough Neagh, and used this as a base to plunder churches in the north of Ireland. Armagh was attacked again in 852, this time by the Dublin Norse. A number of battles were fought between the Danes, the Norse and the Ulster kings. In 866, the Uí Néill king, Áed Finnliath, defeated the Vikings, and it was not until 921 that the Northmen returned to plunder Armagh and the Foyle. In the south of Ireland, the Vikings founded the first towns, such as Dublin, Waterford, Cork and Limerick. These towns became important trading centres, and the Ostmen (as they called themselves) began to play a part in the complex alliances and conflicts between the various Irish kingdoms. No towns were established in the north, probably because the northern kings were powerful enough to resist the Vikings. However, there seems to have been a settlement at Ulfrek's fjord (Larne) and perhaps in some other areas with Viking names, such as Strangford. The word Ulster itself is derived from the Viking Uladztír, based on the Irish words Ulaidh and Tír. Once the Vikings began to raid in 795, Ireland was permanently occupied, wholly or partly, by foreigners. The Danes were followed by the Anglo-Normans in the twefth century.
By the yeare 697, with the defeat of the Airthir and inroads being made against the Airghialla on all sides, including increasing pressures from the Cenél Eogain and the Uí Neill, the Uí Chremthainn were the only branch of the Airghialla not significantly weakened by the advances of other tribes. This remained so until 827 when they were defeated by the Cenél Eogain in the battle of Leth Cam. In response to this defeat however, the Uí Chremthainn became more aggressive. For one, they assumed the title of Kings of Airghialla. Four subgroups emerged from the Uí Chremthainn. These included the Clann Lugain of Fermanagh, Clann Ceallaigh who controlled the area between Fermanagh and Clones in modern county Monaghan, the Síl Daimini who ruled a portion of Fermanagh, and the Uí Nadsluaig of Monaghan, from whom the O'Carrolls and MacMahons descend.
A steady push by the Cenél nEógain in the 7th and 8th centuries reduced the size of the Aighiallan federation as the people of northern Airghialla came to be treated as sub-kingdoms of the Cenél nEógain. During a similar period the southern branches of the Airghialla came under the dominion of the southern Uí Néill kingdoms of Mide and Brega. Naill of the nine hostages died on a raid in France in 405 AD. The northern Uí Néill dynasties were based in the area now known as Donegal, and claimed to be descendants of two sons of Naill (Eógain and Conall). Cenél Eóghain gradually moved eastwards into Tír Eógain (land of Owen, now Tyrone) eventually restricting the older over-kingdom of the Ulaidh to the area east of the river Bann. By about 1050 AD, the centre of power of Cenél Eóghain had moved from Aileach to Tullyhog, and Cenél Connail were able to conquer Inis Eógain (island of Owen, now Inishowen). These two kingdoms were to dominate much of Ulster until the battle of Kinsale in 1601.
By the 9th century Airgialla proper, as a political entity, was practically confined to the modern counties Armagh, Monaghan, Fermanagh, and part of Louth, with the Uí Thuirtri kingdom in east Tyrone in process of being absorbed into the Cenél nEógain over-kingdom of Ailech. In the 12th century the Ua Cearbhaill (O'Carroll) were prominent among the kings of Arghialla. By the 13th century the family of MacMahon (MacMathghamhna) held the superior authority with the title king of Oirghialla (Oriel), by that time a much reduced sub-kingdom.
For many years, the high-king of the northern or southern Uí Néill also claimed to be the high-king of Ireland, a title which had more symbolic than practical significance. However, during the Viking era, their claim was disputed by Brian Bóruma (Boru), a king from a comparatively obscure kingdom in Munster. Brian was able to make the high-kingship a reality, and eventually forced all the other kings (including the Ostmen of Dublin) to give hostages to him. In 1005, Brain arrived in Armagh and proclaimed himself Imperatoris Scotorum (Emperor of the Irish). In 1012, the Leinstermen and the Dublin Ostmen rebelled against Brian, and were defeated two years later at the battle of Clontarf. However, Brian himself was killed at Clontarf, and for about 50 years afterwards, none of the provincial kings were strong enough to claim the high-kingship, without opposition. It was probably Brian's great grandson who commissioned a history called the "The war of the Irish with the foreigners" - a rather successful piece of propaganda claiming that Brian had saved the Irish from Viking oppression. It is believed that the Irish Culdee movement included those who fled from Ireland at the time of Danish ascendancy there to Scotland.
The Uí Nadsluaig ruled at Lough Ooney from around 700 AD but subsequently became prominent throughout the extent of modern day County Monaghan around 1000 AD. This was a time of great turmoil throughout all of Ireland as the concept of an Irish High King took on greater importance and various families struggled to assert their claims. To the north the Uí Neill were dominant. To the west Clann Lugain, also descendents of Chremthainn were dominant. This left any expansion by the Uí Nadsluaig to the east. The eleventh century saw the breaking up of the kingdoms of the Uí Meath, Fir Rois, Conailli, and Mugdorna. Some families of the latter tribe moved east to south Down, giving their name to the Mountains of Mourne. As the Uí Nadsluaig moved east and southward into Monaghan, two other kingdoms remained in place. These were the Ua Baigeallain family of Dartraige and the Mac Murchadha family of the modern barony of Truagh.
At times of crisis, Normans were able to fall back to their main castles of Carrickfergus and Dundrum. Carrickfergus and Coleraine were the main ports, and each of the bailiwicks (counties) had a county court. Perhaps partly to make amends for the churches that they had burnt during their campaigns, the Normans founded a number of new abbeys, and granted Down to the church, renaming it Downpatrick. By 1305, Normans controlled area reached along the coast from Downpatrick to the newly built castle of Northburgh (Greencastle) in Inishowen, but Cenél Eóghain and Cenél Conaill still retained control of their lands in Tír Eóghain and Tír Conaill. Another of Uí Thuirtri and Airghiallan group, the Fir na Chraíbe, were also noted at an early date in the region west of the Bann- in Ulster extended from Bir (Moyola river) to Camus (south of Coleraine).
The neighbors of the Feara Li appear to have been the Uí Tuirtre and factions of both groups are said to have been driven to the east of the Bann (into Ulidia) by the advance of Ua Cathain of the Cenél Éoghain. The Moyola river was anciently the boundary between the Feara Li and the Húi Tuirtre. Their neighbors appear to have been the Uí Tuirtre and factions of both groups are said to have been driven to the east of the Bann (into Ulidia) by the advance of Ua Cathain of the Cenél Éoghain. There was also a Derlas located to the south of Downpatrick, now Bright (Mrechtan), in co. Down, in Uí nEchach country; and yet another cited in Tethba. The kings of the old Ulaid, who resided in pre-historic times at Navan (Meath), pushed east of the line between Newry and Lough Neagh. Their descendants who became known as the Dál Fiatach were more or less confined to the eastern side of Co. Down-400 A.D. In a similar way, the Cruthin from west of the Bann and was more or less finalised by the yeare 563 when `The battle of Móin Dairi Lothair [Moneymore, Co. Derry] was won over the Cruthin by the Uí Néill of the North'.