One of the oldest surviving copies of a poem detailing the Battle of Bannockburn has been restored in time for the battle's 700th anniversary.
The 1,400-line epic poem "The Brus" was written by the Archdeacon of Aberdeen in about 1375, and covers Robert the Bruce's Scottish wars of independence.
A 15th century copy of the poem has been restored by a team at St John's College at Cambridge University.
The Battle of Bannockburn was fought on 23 and 24 June, 1314.
No copies of the poem written in Archdeacon John Barbour's own hand survive, but two editions transcribed about 100 years later are held at St John's College and the National Library of Scotland, in Edinburgh.
After centuries of use by researchers and displays, the St John's manuscript became badly damaged, with pages torn, sections hard to read because of dirt, and the document virtually unusable because the tight binding made it hard to open without damaging the pages further.
The college commissioned experts from the Cambridge Colleges' Conservation Consortium to restore the text, with support from the National Manuscripts Conservation Trust.
Specialists spent several months taking the book apart, cleaning and repairing it, and stitching it back together to the original 15th century pattern.
It is hoped the fully restored version will be helpful to scholars of the Scottish wars and medieval literature.
Kathryn McKee, special collections librarian at St John's College, said the anniversary provided the "impetus" for carrying out the work.
"It's likely the anniversary will result in a fresh wave of interest in Bannockburn and we wanted the book to be available in a fit state," she said.
"The Brus is a unique and nationally important treasure. This project means that we can now make it available to researchers, or put it on public display, without having to compromise its long-term preservation."
The St John's edition of The Brus was given to the college in the 1630s by Thomas, the fourth Earl of Southampton. It was written in 1478, and is thought to have been transcribed by John Ramsay, Prior of the Carthusians at Perth.
However at some point around the late 18th century the book was "rather poorly" rebound, and exposed to "considerable damage", leaving it in a fragile state.
This binding was removed as part of the repair operation, with surface dirt gently dry-cleaned from the pages, tears in the paper repaired, and dog-eared corners flattened out before the manuscript was rebound with traditional materials.
The 700th anniversary of the battle is being celebrated at a number of events, including Bannockburn Live, a two-day re-enactment weekend on 28 and 29 June.