Niall mac Cernaig Sotal (died 701) was a king in southern Brega of the Uí Chernaig sept of Lagore of the Síl nÁedo Sláine. He was the grandson of the high king Diarmait mac Áedo Sláine (died 665). His father Cernach Sotal had died during plague years in 664.
In Niall's time there was a rivalry between the northern septs of the Síl nÁedo Sláine, including the Uí Chonaing sept of Cnogba (Knowth) and the Síl nDlúthaig of Fir Cúl, with the southern septs which included the Uí Chernaig. In 688 Niall defeated Congalach mac Conaing Cuirre (died 696) of Uí Chonaing and his Ciannachta allies at the Battle of Imlech Pich. This battle occurred during the temporary abdication of the high king Fínsnechta Fledach of Brega (died 695) and represents a struggle for control of Brega among the two septs. Finsnechta returned to the throne in 689 only to be assassinated by Congalach in 695 who then assumed the kingship of Brega.
Niall is listed as one of the guarantors of the Cáin Adomnáin ("Law of the Innocents") of Saint Adomnán arranged at the Synod of Birr in 697 where he is called King of Mag Breg. His brother Conall Grant (died 718) is called king of Deiscirt Brega (South Brega) and Niall's son Maine mac Néill (died 712) was also a guarantor. These titles were added to the list of guarantors in 727 and the first use of the title King of South Brega in the Annals of Ulster is not until 751
In 701 Niall was assassinated by the Uí Chonaing king of Brega, Írgalach mac Conaing Cuirre (died 702), at Drumain Ua Casan. According to the Fragmentary Annals of Ireland, Niall was under Adomnán's protection and the saint cursed Írgalach as a result.
Niall's known sons included:
- Maine mac Néill (died 712), slain in battle by Flann mac Áedo (died 714) of the Síl nDlúthaig sept.
- Áed Laigin (died 722),slain at the Battle of Allen in the great defeat of the Ui Neill by the men of Leinster.
- Fogartach mac Néill (died 724), King of Brega and high king of Ireland.
- Cathal mac Néill (died 729),called King of Southern Brega by the Annals of Tigernach.
- Charles-Edwards, Early Christian Ireland, pp. 602–603
- Annals of Ulster AU 664.4
- Annals of Ulster, AU688.4; this contains a lament, attributed to one Gabairchenn, for the Ciannachta leaders killed in battle.
- Annals of Ulster AU 688.3, 689.2, 695.1
- Charles-Edwards, pg.539
- Fragmentary Annals of Ireland, FA 150; the story is discussed by Radner, "Writing history", pp.315–319.
- Annals of Tigernach at CELT: Corpus of Electronic Texts at University College Cork
- Annals of Ulster at CELT: Corpus of Electronic Texts at University College Cork
- Fragmentary Annals of Ireland at CELT: Corpus of Electronic Texts at University College Cork
- Charles-Edwards, T. M. (2000), Early Christian Ireland, Cambridge: Cambridge University Press, ISBN 0-521-36395-0
- Radner, Joan N. (1999), "Writing history: Early Irish historiography and the significance of form" (PDF), Celtica, Dublin: School of Celtic Studies, Dublin Inst. for Advanced Studies, 23: 312–325, ISBN 1-85500-190-X, archived from the original (PDF) on 9 May 2009, retrieved 22 March 2008