Written Irish is first attested in Ogham inscriptions from the fourth century AD; this stage of the language is known as Primitive Irish. Old Irish, dating from the sixth century, used the Latin alphabet and is attested primarily in marginalia to Latin manuscripts. Middle Irish, dating from the tenth century, is the language of a large corpus of literature, including the famous Ulster Cycle. Early Modern Irish, dating from the thirteenth century, was the literary language of both Ireland and Gaelic-speaking Scotland, and is attested by such writers as Geoffrey Keating.
From the eighteenth century the language went into a decline, rapidly losing ground to English due in part to restrictions dictated by British occupation - a conspicuous example of the process known by linguists as Language shift. In the mid-nineteenth century it lost a large portion of its speakers to death and emigration resulting from poverty, particularly in the wake of the Great Irish Famine (1845-1849).
At the end of the nineteenth century, members of the Gaelic Revival movement made efforts to encourage the learning and use of Irish in Ireland.