Mac Aodhagáin (English: Egan or Keegan), is an Irish Gaelic clan of Brehons who were hereditary lawyers - firstly to the Ó Conchobhair Kings of Connacht, and later to the Burkes of Clanricarde. The earliest surviving Irish law manuscript, In Senchas Már, was written prior to 1350 at a school (patronised by the Mac Aodhagáin) at Duniry, near Loughrea. Other branches of the clann maintained schools at Park, outside Tuam, and at Ballymacegan in Co. Tipperary. The work known as Leabhar Breac was produced by one of their students, while Dubhaltach MacFhirbhisigh may have studied at Ballymacegan under Flann Mac Aodhagáin up to the year 1643.