Ulaid (Old Irish, ) or Ulaidh (Modern Irish, ) was a Gaelic over-kingdom in north-eastern Ireland during the Middle Ages made up of a confederation of dynastic groups. Alternative names include Ulidia, which is the Latin form of Ulaid, and in Cóiced, Irish for "the Fifth". The king of Ulaid was called the rí Ulad or rí in Chóicid. Ulaid also refers to a people of early Ireland, and it is from them that the province of Ulster derives its name. Some of the dynasties in the over-kingdom claimed descent from the Ulaid, but others are cited as being of Cruithin descent. In historical documents, the term Ulaid was used to refer to the population group of which the Dál Fiatach was the ruling dynasty. As such, the title Rí Ulad held two meanings: over-king of the Kingdom of Ulaid and king of the Ulaid people, as in the Dál Fiatach. The Ulaid feature prominently in the Ulster Cycle of Irish mythology. According to legend, the ancient territory of Ulaid spanned the whole of the modern province of Ulster, excluding County Cavan, but including County Louth. Its southern border was said to stretch from the River Drowes in the west to the River Boyne in the east. At the onset of the historic period of Irish history in the 6th century, the territory of Ulaid was largely confined to east of the River Bann, as it is said to have lost land to the Airgíalla and the Northern Uí Néill. Ulaid ceased to exist after its conquest in the late 12th century by the Anglo-Norman knight John de Courcy, and was replaced with the Earldom of Ulster. An individual from Ulaid was known in Irish as an Ultach, the nominative plural being Ultaigh. This name lives on in the surname McAnulty or McNulty, from Mac an Ultaigh ("son of the Ulsterman"). Name Ulaid is a plural noun and originated as an ethnonym; however, Irish nomenclature followed a pattern where the names of population groups and apical ancestor figures became more and more associated with geographical areas even when the ruling dynasty had no links to that figure, and this was the case with the Ulaid. Ulaid was also known as Cóiced Ulad, the "Fifth of Ulster", and was one of the legendary five provinces of Ireland. After the subsequent loss of territory to the Airgíalla and Northern Uí Néill, the