It is true that the Irish were one of the earliest European peoples to adopt the use of surnames. It is thought that as the Irish ruling dynasties and population groups became larger and more numerous, the ruling families needed a process by which they could narrow down eligibility for kingship and identify members of the ruling family. They did this by adopting a surname, usually the personal name of a very prominent and successful family member who lived in the tenth or eleventh century, followed by the prefix Mac 'son of' or more popularly Ua (later O') 'grandson of'. The most famous and well known example are probably the O'Briens. This family from the Dál Cais dynasty of County Clare, adopted the surname in the late 1000s and early 1100s when the ruling family led by Brian Boru's great-grandson Muirchertach, a very successful and gentlemanly High-King of Ireland, adopted the surname Ua Briain, grandson of Brian. It seems hard to believe today that most O'Briens who live in Ireland or whose ancestors emigrated all over the world are indeed descended from the famous Irish king Brian Boru, excepting only some minor families on the island, who were not O'Briens at all, but who later adopted the O'Brien surname due to it being similar sounding or close to their own surname. The O'Breens of Westmeath are a good example of this. When the O'Briens adopted their surname they successfully established that they were the ruling family of the Dál Cais, and their closely related families descended from cousins or brothers of King Brian adopted other surnames. For example the O'Kennedy family were descended from a brother of Brian, as were other families such as the Ahernes. Other most distantly related Dál Cais families also adopted surnames such as McNamara, probably the most powerful family amongst the Dál Cais after the O'Briens, and there were other families also such as O'Dea and O'Hogan. As the years passed some of the O'Brien families in turn adopted their own surnames to differentiate themselves from the rest of the O'Briens. Another good example are the McMahons of west Clare who are descended directly from the High-King Muirchertach Ua Briain. Another branch of the O'Briens adopted the surname McBrien, but this surname, although it was used for many years in late medieval times did not last, as most members of this family eventually re-adopted the O'Brien form of the name.
The first Irish surnames appear to have been adopted in the western province of Connacht, by the various branches of the ruling Uí Briúin dynasty. The first surname to be used may have been Ua Ruairc (now O'Rourke). In the years 906/07 the Irish annals record the death of Fergal Ua Ruairc the King of Connacht, whose surname was taken from his grandfather Ruarc, the King of Breifne who died in the year 898. Other Connacht families to adopt the use of surnames early on were the Ua Flaithbertach (now the O'Flahertys), of the Uí Briúin Seóla dynasty. The first user of the surname, Ruaidrí Ua Flaithbertaig, King of Iarthair Chonnacht, who died in 1062, took his surname from his great-grandfather Flaithbertach. The O'Connor family (Ua Conchobair), who later monopolised the Kingship of Connacht may have adopted their surname a little later.
Surnames were also adopted early by the Cenél nEógain dynasty of Ulster. Domnall Ua Néill (O'Neill) king of Cenél nEógain and High-King of Ireland, who died in 980, was the first to use this very famous Irish surname. He took his surname from his grandfather Niall Glúndub who was also High-King of Ireland and who died fighting the Vikings in the battle of Dublin in 919. When another branch of the Cenél nEógain challenged the O'Neills for the kingship of Tyrone in the mid-eleventh century they adopted the surname Ua Lochlainn, which within a generation or two became McLoughlin. Other branches of the Cenél nEógain who occasionally challenged for the kingship of Tyrone adopted the surnames O'Laverty and O'Gormley. But they were all the one dynasty.
East of the Bann in the kingdom of the Ulaid, the ruling family adopted the surname Ua hEochada (O'Haughey), by the 1080s. As time passed however, this family found the need to further restrict the eligibility for kingship and the ruling family adopted the surname McDunlevy. To make the history of this family even more confusing many of the McDunlevys later adopted the surname McNulty in later medieval times.
I hope this blog has been interesting to readers. As is hopefully evident the adoption of surnames by the Irish was early in a European context but was certainly not the result of some fictional edict passed by Brian Boru. The adoption of surnames was due to a need for identification and a desire to restrict eligibility for kingship which appears to have arisen in Ireland in the 900s and which continued in the ensuing centuries. The first Irish surnames may have appeared in the province of Connacht but surnames also came early to the Cenél nEógain dynasty in the north. Ironically, in light of later made up history, surnames came late to the O'Briens and the Dál Cais, although it is astounding to think that all of the many, many thousands of O'Briens in Ireland and all over the world, are indeed descended from that one remarkable man, Brian Boru.