Flann Mainistrech (died 25 November 1056) was an Irish poet and historian.
Flann was the son of Echthigern mac Óengusso, who had been lector at the monastery of Monasterboice (modern County Louth), in Irish Mainistir Buite, whence Flann's byname, meaning "of Monasterboice". He belonged to the Cianacht Breg, a kindred which by the turn of the first millennium controlled Monasterboice, providing its abbots and other notables. Flann himself was also fer légind (lector, or head of school) there, as was his father. His son, also called Echtigern (d. 1067), would become superior (airchinnech) of Monasterboice.
Flann's works appear to have been written beginning in the years following the battle of Clontarf, when Máel Sechnaill mac Domnaill of the Uí Néill resumed his reign as High King of Ireland. Some of Flann's surviving historical poems deal with Clann Cholmáin, to which Máel Sechnaill belonged, such as Mide maigen clainne Cuind, while Mugain ingen Choncraid chain and Síl nÁedo Sláine na sleg deal with the neighbouring Uí Néill kindred of Síl nÁedo Sláine, who ruled over Ciannacht Breg.
A number of Flann's poems appear in the Lebor Gabála Érenn—the Book of Invasions—and his works on the Tuatha Dé Danann were influential. Flann's synchronisms, lists of Irish and Scottish kings arranged to show contemporaries, are important sources for the early history of Scotland. Eoin MacNeill considered Flann the first of the synthetic historians; this synthesis of biblical history and foreign world chronicles with Irish annals, myths and genealogical records was to be much emulated by subsequent writers. Francis John Byrne has stated that he "...was the leading light among the 'synthetic historians' who shaped what was to remain the official history till the seventeenth century and beyond... and that "...it was largely on his [Flanns] authority that the official doctrine of the monopoly of the high-kingship by the Uí Néill from the time of St Patrick to the usurpation of Brian became accepted, even by the Munster Annals of Inisfallen."
- Carey, John (2004), "Flann Mainistrech (d. 1056)", Oxford Dictionary of National Biography, Oxford: Oxford University Press, retrieved 2008-03-22
- Byrne, Francis John (2005), "Ireland and her neighbours, c.1014-c.1072", in Ó Cróinín, Dáibhí, Prehistoric and Early Ireland, A New History of Ireland I, Oxford: Oxford University Press, pp. 862–898, ISBN 978-0-19-922665-8
- "Rēidig dam, a Dē do nim", ed. and tr. Seán Mac Airt (ed.). "Middle-Irish poem on world-kingship." Études Celtiques 6 (1953/54): 255–80; 7 (1955/56): 18–45; 8 (1958/59): 98–119, 284–97.
- "Luid Iasōn [i]na luing lóir" (ascribed to Flann Mainistrech), ed. and tr. Gearóid S. Mac Eoin. "Dán ar Chogadh na Traoi." Studia Hibernica 1 (1961): 19–55.