 He was the son of Máel Dúin mac Máele Fithrich (died 681), a King of Ailech, and great grandson of the high king Áed Uaridnach (died 612).He belonged to the Cenél maic Ercae branch of the Cenél nEógain and was King of Ailech from 700 to 722.As King of Ailech Fergal participated in a victory over the men of Connacht in 707 where their king Indrechtach mac Dúnchado was slain.