(CNN) There are elements of Middle-earth near a French village -- though how deep they go is anyone's guess.

In 1916, a 24-year-old British soldier named J.R.R. Tolkien went off to fight in World War I. He was stationed near the village of Bouzincourt, took part in the nearby Battle of the Somme and writes about the area in his diaries.

Jeff Gusky, an explorer and photographer who maintains a site called "The Hidden World of World War I," believes Tolkien may have visited Bouzincourt's caves, places where hundreds of soldiers took refuge during the Somme -- and that some of his impressions ended up in "The Lord of the Rings."

"I feel that this is the place," Gusky said. "It's so raw and unchanged from a hundred years ago."

Tolkien scholar John Garth isn't so sure.

"On the Somme, he certainly spent time in deep trench dugouts, and he would have been aware of the subterranean world of the army tunnelers -- all of which would, I believe, have given his descriptions of Moria and other Middle-earth underworlds some of their vitality," Garth, the author of "Tolkien and the Great War," wrote in an email.

J.R.R. Tolkien based some of "The Lord of the Rings" on his World War I experiences.

"But the caves at Bouzincourt? There's no evidence that Tolkien's battalion stayed in anything other than huts, bivouacs or conventional billets while there in the summer of 1916," he added.

'To enter these vaults'

Gusky, who previously immersed himself in an underground city near Naours, France , came to the caves to chronicle the marks and inscriptions left by the soldiers who stayed there.

For many, it was perhaps the last sign of their existence before heading off to the slaughter of the Somme. The battle produced more than 1 million casualties in the summer and fall of 1916 -- more than 57,000 British casualties alone on July 1, the clash's first day.

It was the bloodiest battle of the war and one of the most horrific in human history

The cave inscriptions range from the basic to the elaborate.

One person, perhaps a Canadian, drew what appears to be a maple leaf with the number "51" underneath. Others, members of the 60th Battalion of the Canadian Expeditionary Force, wrote their names: "E.C. Eaton," "E. Preston."

There were many Britons as well: members of the HLI (Highland Light Infantry) and Fusiliers. One, an "E. Pinder," wrote that he was "the first British soldier to enter these vaults, June 12th, 1916, Whit Monday."

All told, Gusky photographed and catalogued 829 names in the caves, including about 500 Canadians and 250 to 300 Britons, he said.

Shaping 'Lord of the Rings'

Regardless of whether Tolkien knew of the caves, there's no question that the author's experience at the Somme influenced "The Lord of the Rings."

"The Dead marshes and the approaches to the Morannon owe something to Northern France after the Battle of the Somme," he wrote in a letter, according to a story on the Green Books portion of TheOneRing.net

The author was also fond of caves, said Garth.

"He visited England's Cheddar Caves on his March 1916 honeymoon, and later said they inspired the Glittering Caves of Aglarond in 'The Lord of the Rings,' " he observed.

Given the ultimate price many paid at the Somme, Tolkien was one of the lucky ones. He took part in two offensives but generally spent his time in the trenches before contracting trench fever and being transferred to a hospital in late October. Two of his close friends died.

There is at least one relatively well-known name confirmed at Bouzincourt -- though in the village cemetery, not the caves. A gravestone marks the burial spot of a man named Lionel Lupton, the son of Francis Lupton, an industrialist and real estate magnate from Leeds, England.

Francis Lupton was the great-great-grandfather of Catherine, the Duchess of Cambridge. With the death of Lionel and his two brothers, the family wealth -- much in a trust -- passed to Francis' daughters. One of them, Olive, married a man named Noel Middleton. They are Kate's great-grandparents.

Gusky marvels at the Bouzincourt caves and cemeteries, so close to the battle lines.

"When you go to Bouzincourt from any direction, you cross through cemetery after cemetery. You see death all around you," he said. "In Tolkien's diaries he talks about how men were being brought in in droves, and they were not just injured, they were mutilated."

Seeing all the names in the caves and on grave markers was sobering, he said.

"These names took on a different meaning, knowing that so many had died," he said.