The Ó Duibhgeannáin () clan were a family of professional historians in medieval and early modern Ireland. They originated in the kingdom of Annaly (formerly called Tethbae) on the east bank of the Shannon (mostly situated in what is now County Longford) and later migrated into Connacht. Writing in 1921 the Irish historian, Fr. Paul Walsh stated that "The celebrated Dubhaltach MacFhirbhisigh ... informs us that the O Duigenans followed the profession of historiographers under the families of Clann Mhaiolruanaidh and Conmhaicne in Magh Rein, that is, with the Mac Dermotts and the MacDonoughs in the west, and with the O Farrells in the territory of Annaly." The earliest known reference to a bearer of the surname dates to 1296, when, according to the Annals of the Four Masters, "Maelpeter O'Duigennan, Archdeacon of Breifny, from Drumcliff to Kells, died." Less than thirty years later in the year 1323 (according to the same source) – "Gillapatrick O'Duigennan, Chief Historian of Conmaicne, and Lucas, his son, were slain by Conor, the son of Garvey Maguire." The family themselves can be traced back with confidence several centuries further, ultimately to Maine of Tethba, an alleged son of Niall of the Nine Hostages. While Maine's relationship is probably fictitious, there seems to be no good reason for doubting that the O Duibhgeannain descend from the figure claimed as an ancestor by the rulers of Uí Maine. From Annaly to Moylurg: Kilronan and Castlefore By the 14th century, while some lines of the family remained in Annaly, the senior branches and others moved west into Moylurg where they became historians for the MacDermots. The senior line, under Ferghall Muimhneach, built Kilronan's church in 1339 to which they became erenachs, or its lay proprietors. The Four Masters include the following early references to the family, and Kilronan church: "1339: The church of Kilronan was erected by Farrell Muimhneach O'Duigenan." "1340: Philip O'Duigenan, ollav [chief poet] of Conmaicne, died. The church of Kilronan was burned." "1347: The church of Kilronan was re-erected by Farrell O'Duigenan. Finola, daughter of Mac Fineen, and wife of Farrell O'Duigenan, died." "1357: Clement O'Duigenan, Vicar of Kilronan, died. He was called Sagart-na-Sinnach [Priest of the Foxes]. Muimhneach O'Duigennan, ollav of Conmaicne and Clann-Mulrony, Lower and Upper, died." "1360: Naevag O'Duigennan died." "1362: Cu-Connacht O Duigeannain, Vicar of Cill Ronain, rested in Christ." "1381: Lasairiona, daughter of Ferghal O Duigeannain, wife of O