As a new JRR Tolkien biopic opens in cinemas, John Garth explores how Tolkien's friendship with CS Lewis – and a bet about sci-fi – inspired The Lord of the Rings

Once upon a time two friends made a wager. "Tollers," one said to the other, "there is too little of what we really like in stories. I am afraid we shall have to try and write some ourselves." At this time CS Lewis and JRR Tolkien were "like two young bear cubs... just happily quipping with one another", in the words of an Oxford contemporary. In 1936, their historic wager to write about space- and time-travel was a vital step on the road to their most famous fantasy works.

The year 1936 had seen the two Oxford English dons hit their academic zenith with works that still shape medieval literary studies today: Lewis’s The Allegory of Love and Tolkien’s Beowulf: The Monsters and the Critics. Yet they were also wannabe authors – Lewis, 38, was an unsuccessful poet, and Tolkien, almost 45, an unpublished mythmaker.

Both had grown up reading science fiction classics such as Jules Verne’s From the Earth to the Moon and HG Wells’s The Time Machine. In the Thirties the genre was exploding, ranging from the monster-bashing gee-whizzery of US pulp magazines to serious speculation, especially in Britain.