Máel Dúin mac Fergusa

Máel Dúin mac Fergusa (died 785) was King of South Brega of the Uí Chernaig sept of Lagore of the Síl nÁedo Sláine branch of the southern Ui Neill. He was the son of Fergus mac Fogartaig (died 751), a previous king of South Brega, and grandson of the high-king Fogartach mac Néill (died 724). He ruled from 778 to 785.

The high king Donnchad Midi (died 797) had campaigned against Leinster in 780 and then made peace. The next year in 781 the Battle of the Rig was fought between the Síl nÁedo Sláine and the Uí Garrchon branch of the Laigin and their king Cú Chongalt was slain. Donnchad had subdued Brega in 778 and the annals do not mention whether this campaign versus the Uí Garrchon was part of Donnchad's campaign or an act of defiance by the men of Brega or simply a border warfare with no connection. The campaign is significant in that both septs of the Síl nÁedo Sláine, both the Uí Chernaig and the Uí Chonaing of north Brega, participated together. These two septs had been fighting for much of the eighth century. Máel Dúin and his cousin Fogartach mac Cummascaig (died 786) were the Uí Chernaig leaders in this battle.

Máel Dúin is titled King of Loch Gabor at his death obit in the annals. The first time this title is used in the annals His sons, Óengus mac Máele Dúin (died 825) and Cairpre mac Máele Dúin (died 836) were also kings of Loch Gabor.