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 Ciannachta 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 (lit. 'man of textual study', i.e. lector, head of a monastic school) there, as was his father. His son, also called Echthigern (d. 1067), would become superior (airchinnech) of Monasterboice.
Flann's earliest datable works are from the years following the battle of Clontarf (1014), when Máel Sechnaill mac Domnaill of the Uí Néill resumed his reign as High King of Ireland (1014-1022). These are Ríg Themra dia tesbann tnú and Ríg Themrea toebaige íar ttain, which together comprise an Uí Néill-orientated history of the kingship of Tara. Among his other poems, some apparently composed much later in his life, Mide maigen clainne Cuind, deals with Clann Cholmáin, to which Máel Sechnaill belonged, while Mugain ingen Choncraid chain and Síl nÁedo Sláine na sleg both deal with the neighbouring Uí Néill kindred of Síl nÁedo Sláine, sometime overlords over Ciannachta Breg. Flann is also attributed a series of five poems on the kings and martial history of the northern Uí Néill kingdom of Cenél nÉogain and on the legendary origins of Cenél nÉogain's fortress at Ailech.
A number of Flann's poems appear in the Lebor Gabála Érenn—the Book of the Invasion of Ireland—and his works on the Tuatha Dé Danann were influential, while a couple concern world history or themes from classical literature. The most influential was Réidig dam, a Dé, do nim, a lengthy metrical history of the world kings of Eusebian tradition which appears to be related to Bede's Chronica Maiora. During the early modern era, Flann became known as the author of a number of prose synchronistic tracts. While the tracts are authentically medieval, non-circumstantial evidence for Flann's involvement is lacking. Some of these tracts set Irish history within universal history, in the tradition of the Eusebius-Jerome Chronicon. Another presents lists of Irish and Scottish kings arranged to show contemporaries, which is an important source for the early history of Scotland, whether or not Flann is taken as its author.