JRR Tolkien
JRR Tolkien's 1926 translation will be accompanied by his previously unpublished short story Sellic Spell Wikimedia Commons

JRR Tolkien's translation of Beowulf, the longest epic poem in Old English which inspired The Lord of the Rings and The Hobbit, is to be published almost 90 years after it was completed.

Beowulf: A Translation and Commentary is due to be published by HarperCollins in May, with the 1926 translation and a commentary taken from Tolkien's lecture notes made throughout the 1930s.

It has been edited by the author's son, Christopher Tolkien, who said the attention to detail was "as if he entered into the imagined past: standing beside Beowulf and his men shaking out their mail-shirts as they beached their ship on the coast of Denmark".

Beowulf was penned in the 11th century and tells the tale of prince Beowulf coming to the aid of Danish king Hroðgar, whose mead hall was under attack by the monster Grendel. Beowulf slays him and his mother and returns victorious to Geatland in Sweden - to become king of the Geats. Finally, fifty years later, Beowulf defeats a dragon but is fatally wounded.

The poem has inspired a number of translations, including one by the late poet Seamus Heaney in 1999, which won him the Whitbread book of the year award.

Tolkien completed the translation in 1926, but "seems never to have considered its publication", according to his son.

Now Tolkien estate has agreed a deal with HarperCollins, which will see the book published on 22 May. As well as the commentary, Tolkien's previously unpublished short story, Sellic Spell, will be included.

Tolkien's Beowulf will be the first new work by the author since The Fall of Arthur, which was published posthumously in May 2013. Inspired by high medieval Arthurian fiction, it depicts Arthur as a British military leader fighting the Saxon invasion.

Rumours of the Beowulf translation had been circulating among academics for some time, but its release was not expected to follow so close to Tolkien's Arthurian translation.

Tolkien himself described Beowulf as "sombre, tragic, sinister, curiously real" and as being "laden with history, leading back into the dark heathen ages beyond the memory of song, but not beyond the reach of imagination".

The author took up a post as a Reader in English Languages at the University of Leeds in 1920, where he produced a definitive edition of Sir Gawain and the Green Knight with EV Gordon. He also studied and worked at the University of Oxford, becoming a professor of Anglo-Saxon at Pembroke College in 1925.

Stuart Lee, a member of the English faculty at the University of Oxford, said: "Beowulf was a text that thrilled Tolkien throughout his lifetime. He taught it and studied it and, along with many medieval texts he worked on, they found their way into his fiction."

He continued: "Tolkien's unpublished material is of such a high quality that it deserves publishing. He was a fantastic scholar. Any translation and commentary by JRR Tolkien will be worth looking at, and any work by his son Christopher is always of high quality. It's very exciting this is coming out."

"It should be interesting to fans of his fiction, because Beowulf was probably the medieval text that influenced him the most."