Niall mac Eochada was king of Ulaid from 1016. His early military ventures were against members of his own sept, Dál Fiatach. In 1022 he defeated the Dublin Norse at sea. In 1024 he invaded Dublin and took hostages.