Diarmait mac Tommaltaig (died 833) was a king of Connacht from the UàBriúin branch of the Connachta. He was the great-grandson of Indrechtach mac Muiredaig Muillethan (died 723), a previous king. The death of his father Tommaltach mac Murgail (died 774) is recorded in the annals where he is called king of Mag nAi. He succeeded his brother Muirgius mac Tommaltaig (died 815). He was of the SÃÂl Muiredaig sept of the UàBriúin. He ruled from 815 to 833.
His brother had been a successful king who built up the local power of Connacht. Diarmait was confronted with opposition upon his succession. In 816 he defeated the UàFiachrach Muaidhe (a rival dynasty of County Mayo who had last held the kingship in 773) and sacked Foibrén in the territory of Grecraige (a subject people of the UàFiachrach Muaidhe). The annals point out that many common people were killed in this attack.
Then in 818 he imposed his authority over the UàMaine (the third major grouping of Connacht in Counties Galway and southern Roscommon) with a Pyrrhic victory at the Battle of Forath in the territory of the Delba Nuadat (a subject people of UàMaine in southern Roscommon). Their king Cathal mac Murchada was slain. Máel Cothaid mac Fogartaig of the SÃÂl Cathail sept of the Ui Briun is listed with Diarmait as victors in this battle and they are called Kings of the UàBriúin, implying Diarmait may have shared his rule at first.
In 822 Diarmait defeated his rivals among the UàBriúin at the Battle of Tarbga. Dúnchad son of Maenach, and Gormgal son of Dúnchad were slain. In this battle the UàMaine fought alongside Diarmait. The annals record another battle among the Connachta in 824 in which many fell. No more opposition is recorded to the rule of Diarmait in the annals after this.
In 818 the Bishop of Armagh, ArtrÃÂ son of Conchobor, came to Connacht with the shrine of Saint Patrick. He returned in 825 to impose the law of Patrick upon the three Connachta. These actions would help to establish the legitimacy of Diarmait's rule.
In 829 the high king Conchobar mac Donnchada (died 833), with the men of Mide (Meath), attacked Connacht and defeated the Connachta in battle. In 830, the King of Munster, Feidlimid mac Crimthainn (died 847), invaded and crushed the southern UàBriúin Seola. These actions occurred during a short-lived alliance of these two kings who were soon engaged in hostility with one another.