Ua Tuathail, Muirchertach (d. 1164), son of Gilla-Comgaill and king of northern Leinster, belonged to the Uí Muiredaig lineage of the Uí Dúnlainge dynasty. His family line descended from Tuathal (qv) (d. 958), king of Uí Dúnlainge, and he was sixth in descent from the latter's son Dúnlaing (qv) (d. 1014). His father Gilla-Comgaill was lay-abbot of Glendalough, and may also have held the kingship of Uí Muiredaig; he was slain (1127) during disturbances when Tairdelbach Ua Conchobair (qv) was asserting his lordship over Leinster. Muirchertach married at least three times. The mother of Augaire Ruad was probably his first wife. He also married the daughter of Cerball grandson of Bricc, the mother of his sons Lorcán (Lorcán Ua Tuathail (qv)), Gilla-Comgaill, and Dúnlaing, and of his daughter Sadb. He then wed Cacht daughter of Ua Mórda of Loígis, the mother of his sons Áed, Tuathal, and Conchobar, and of his daughter Mór. It is not clear which of his wives was the mother of his daughter Gormlaith.
At the time of his father's death, Muirchertach was aged presumably in his late twenties, but was twice by-passed for the kingship. This dignity was held by two cousins in turn, Augaire (slain 1134) and Murchad, under the suzerainty of Diarmait Mac Murchadha (qv). When Murchad and sixteen other Leinster sub-kings were slain by Mac Murchada during a purge in 1141 (called ‘the year of the long knives’), Muirchertach was promoted to the kingship. It is clear, however, that he was distrusted by his overlord for some time: his son Lorcán was held hostage as a surety for his loyalty, and the endowment of the Cistercian foundation of Baltinglass seemed calculated to split his territory in Co. Wicklow from his base-kingdom in south Co. Kildare.
By the early 1150s Muirchertach had reached an accommodation with Mac Murchada, to whom his daughter Mór was married to seal the agreement. The diocese of Glendalough, as approved at the synod of Kells (1152), was designed to encapsulate his regional overkingdom, and his son Lorcán was appointed to the abbacy of Glendalough the following year. Perhaps this extension of his family's influence in the area of the Wicklow mountains caused resentment among the local ruling lineages; in 1154 Muirchertach defeated and slew the petty king of Uí Enechglaiss. The maintenance of good relations with Mac Murchada is demonstrated by the elevation of his son Lorcán to the archbishopric of Dublin in 1162.
Muirchertach died in 1164 and was succeeded in turn by his sons Gilla-Comgaill (d. 1176) and Dúnlaing (slain 1178). The latter's death in battle against the English custodian of Waterford, Robert le Poer (qv), marks the extinction of the local kingdom of Uí Muiredaig. The family of Ó Tuathail (O'Toole) re-emerged, however, in the later medieval period as local rulers of Imaal and of other lordships in Co. Wicklow.