The only complete manuscript of one of Robert Burns' bawdy songs has been discovered in Sir Walter Scott's Abbotsford library in the Borders.
Original manuscript of bawdy Burns' song, discovered in Sir Walter Scott's Abbotsord library
"O saw ye my Maggie" is bound in a copy of The Fornicators' Court, a risqué work of which only 10 copies were made.
The lyrics offer a rare insight into Burns' abilities as a lyricist and his "enlightened" views on women and sex.
Glasgow academic Dr Gerry Carruthers said it showed the bard's preoccupation with offering pleasure to the female.
The song is thought to have been based on a traditional folk song and the manuscript was discovered by the Faculty of Advocates at the Abbotsford Library in Melrose.
Dr Carruthers, of Glasgow University, said: "The Abbotsford version highlights a very serious, even as it is joyous, attitude to the body.''
He added that the discovery of the Burns work, along with a recently unearthed 550-year-old medieval manuscript, highlighted the Abbotsford Library as a literary "treasure trove".
The Burns manuscript also contains a spoof will in the bard's hand dedicating the song to Alexander Findlater, his friend and supervisor at the Dumfries Excise office.
Findlater was a staunch supporter of Burns, defending the poet's reputation from accusations of drunkenness following his death.
The inclusion of the spoof will is believed by experts to be a private joke by Burns, playing on his mistaken reputation at this point in his life as a writer of gratuitously-bawdy work.
The manuscript is mentioned in the 1838 catalogue of Scott's collections. He is thought to have arranged to have it bound with the poem.
The document reveals Robert Burns' lyrical leanings
Scott and Burns met only once, in 1786, at the house of Professor Adam Ferguson in the Sciennes district of Edinburgh when Scott was just 15. A portrait of the encounter hangs at Abbotsford.
Lindsay Levy, the faculty's cataloguer of rare books, came across the song in the course of her work of cataloguing Scott's library with its collection of more than 9,000 books.
"The spoof will is headed 'In the name of Venus, Amen!' and written in very large sprawling writing," Lindsay explained.
"I immediately thought of the two friends in a pub. Burns shows Findlater his new song and, many drinks later, decides to add this note.
"Details like this make cataloguing the Abbotsford Library such a rewarding task.
"Scott also wrote in his books, often adding extremely sarcastic comments if he didn't like them.
"Working with handwritten off-the-cuff comments of such well-known writers is almost like having a conversation with them."
Dr Carruthers concluded: "Arguably, this manuscript is one of the most revealing documents into Burns' methodology as a song lyricist - even though there is some doubt over the extent to which the lyric is original and the extent to which it draws on a traditional song.
"The manuscript is important as an insight into Burns's probable working methods and his cultural context, highlighting his enlightened attitudes towards women and the body and his awareness of his own reputation."
But while authenticating the Abbotsford manuscript, Dr Carruthers cast doubt on the inspiration behind the bard's masterpiece, Tam O'Shanter.
He disputes the long-held view that the poem was the folk tale of a drunken husband who stumbles on witches at Hallowe'en.
Instead he claims that Burns actually created the legend himself.
A nationwide search has been launched to find talented new Scottish songwriters.
The Burnsong project, which was launched on Monday, aims to encourage contemporary songwriting while celebrating the work of the bard.