But for a spoon and a “lightbulb” moment, Linda Cook would never have found her grandfather, who had been missing for 102 years.

He was lying where he fell, gradually hidden then finally lost as shellfire exploded in the earth around him in a field near Lens, northern France.

When the cold soil, compacted over a century, finally surrendered him on a sunny January day in 2018, he was another unknown soldier. It would take painstaking detective work before the name L/Cpl Frederick Thomas Perkins, 25, could be carved with confidence on a headstone.

At his reburial with full military honours this week at Loos British military cemetery near Lens, ahead of Remembrance Sunday, his tearful granddaughter, now 67 and a grandmother herself, could still scarcely believe it. “Because he was lost. No one knew where he was. And now he has a grave and a headstone. And so many of them won’t,” she said.

About 50 first world war soldiers are found on the western front each year, disinterred by the farmer’s plough or developer’s digger. Only one or two in ten are ever identified, said Steve Arnold, an exhumation officer with the CWGC (Commonwealth War Graves Commission) recovery and reburial unit based near Arras.

Arnold was called out to recover Perkins’ remains, found during a check for unexploded ordnance on the site of a planned new hospital in Lens. Among belongings found, his helmet, bayonet, knife and fork were badly corroded and revealed little.

The first real clue was a pair of metal shoulder titles of the Essex Regiment. And then there was the spoon. It was engraved with “4EX” on one side and the number 3899 on the other.

Facebook Twitter Pinterest Perkins was 25 when he died. Photograph: Handout

There was no identity disc. “But we were lucky that Essex Regiment decided to have numbers put on their spoons,” said Arnold.

It looked as though this unknown soldier was serving with the 4th battalion of the Essex Regiment. There was only one problem: that battalion never served in France.

“So how did he end up there? Was this even his spoon?” said Arnold.

Today, 160 sets of recovered remains lie behind the closed mortuary doors at the CWGC Experience centre at Beaurains, near Arras, where the public can see the work of the stonemasons, blacksmiths, carpenters, and gardeners who for 100 year have maintained the immaculate Commonwealth cemeteries of the western front and across the world.

It is home to the recovery and reburial unit. Each set of remains is a puzzle that Arnold, his team and the British armed forces “war detectives” at the Joint Casualty and Compassionate Centre are working to crack.

Arnold’s report on Perkins included that a fragment of a notebook found with him bore the number 389 – indicating that the spoon was indeed his. But there was another problem: no soldier had the number 3899 recorded on death. The report landed on the desk of Rosie Barron at the JCCC.

Service numbers were not introduced until 1920, and first world war regimental numbers changed if you switched battalion. “At some point he had served with the 4th battalion, the Essex Regiment, and with the regimental number 3899” said Barron. “But we probably weren’t looking for someone still serving with the 4th when he died.”

One obstacle when researching first world war records is that more than half were destroyed in the second world war, when German bombers struck the War Office repository in London.

However, each battalion kept a war diary. Handwritten, they detailed action and casualties and are kept at the National Archives. Barron ploughed through each of the eight Essex Regiment battalions with soldiers still missing, looking for which had ever passed through Lens.

“It was a big task,” she said. “But I found that the 11th battalion was in the area in 1917. They attacked from there on 22 April and they were also in the area between 24 June and 9 July 1917. That threw up 67 soldiers still missing from the 11th battalion,” she said.

“If we hadn’t had the spoon and the notebook, that is probably where the search would have ended.”

Facebook Twitter Pinterest Linda Cook, Perkins’ granddaughter, laying a poppy wreath during the burial service. Photograph: Thierry Chesnot

Maj Peter Williamson, the chairman of trustees at the Essex Regiment Museum in Chelmsford, took up the challenge. “All the army numbers they had at the point they died were recorded. But not one of them started with 38,” he said.

Evaluating sequential enlisting numbers he worked out the unknown soldier probably enlisted in the 4th battalion, a territorial unit, in around April 1916. He would not have had time to be trained and deployed to another battalion before joining the 11th. Eliminating those who had served with other battalions, Williamson whittled possibles down to just 28.

“Then I had a “lightbulb” moment”, said Williamson. Next-of-kin of first world war dead were paid a war gratuity, the amount dependant on rank and length of service. Details are recorded in a series of books held by the National Army Museum, but digitised on some genealogy websites. Working back from possible dates of death, he could calculate if someone might have enlisted in April 1916.

That led him to a probate section devoted entirely to soldiers’ wills. “In the first world war, lots of soldiers made straightforward wills on an army form,” he said. “So I then ordered as many wills of those 28 as had made a will. The will for L/Cpl Frederick Thomas Perkins eventually came in. And bingo.”

It had Perkins original number, 3899, and the new number he was allocated when he went over to France and was sent to the 11th battalion. He had died on 22 April 1917, alongside 51 other men of his battalion, who have no known grave. A match was later confirmed by a DNA test with a great nephew.

L/Cpl Perkins, from Great Waltham, Essex, was aged just 25 when he died. He was married to Florence Annie and was father to a young son, Philip Jethro. He was the eldest of seven children of James and Elizabeth Perkins of Ford End, Essex, he worked for TD Ridley and Sons Ltd Hartford End Brewery Essex. And he died during a raid on Nash Alley, north of Lens.

His granddaughter, who lives in Chelmsford and has two sisters living in the US, has been researching her family history for more than 20 years. Cook had posted his photograph on Ancestry.com years ago, so was dumbfounded when she received a message from Barron that he had been found.

“I always knew my dad’s dad had been killed in the first world war, and my father was only three when it happened. And his mum – my nan – remarried when he was about five. So I don’t actually remember anything much being said about him,” said Cook, who has her grandfather’s war medals.

The Royal Anglian Regiment, into which the Essex was amalgamated, provided bearers and a firing party for his funeral on Thursday. “The service was beautiful. I know he is now at peace, among his comrades. It’s something I will take to the grave with me,” Cook said.

She intends to give the possessions found with him to the Essex Regiment Museum. “But the spoon, I don’t know if can. It’s going to be really hard. Because that is one possession that means so much.”

• This article was amended on 9 November 2019. In an earlier version an interviewee incorrectly said that British soldiers did not carry “dog tags” in the first world war. This has been removed.