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.