A detail from a 4×5-inch photo depicting Billy the Kid, left, playing croquet in 1878.
Photograph: Kagin's

Henry McCarty, known in Wild West lore as Billy the Kid, lived a brief and violent life, stealing and killing before his death in a gunfight aged 21. He lived with a gun in his hand – and sometimes, it seems, a croquet mallet.

In a surprising historical twist, the second photo of McCarty ever to be authenticated shows him and his posse, the Regulators, playing the sport in New Mexico in 1878.

The faded image was among a pile of photos inside a cardboard box at a junk shop in Fresno, California, unearthed by a collector in 2010. Randy Guijarro paid $2 (£1.30) for the image, which is now estimated to be worth millions of dollars. The only other confirmed photo of Billy the Kid, from 1880, sold for $2.3m (£1.5m) in 2011.

The photo was authenticated by a San Francisco-based Americana company, Kagin’s, which identified Billy the Kid along with several members of the Regulators, as well as friends and family. It was taken after a wedding in the summer of 1878, just a month after the gang took part in the brutal Lincoln County war.

When the photo was first brought to the company, its experts were “understandably sceptical”, said David McCarthy from Kagin’s. “An original Billy the Kid photo is the holy grail of Western Americana.

“We had to be certain that we could answer and verify where, when, how and why this photograph was taken. Simple resemblance is not enough in a case like this – a team of experts had to be assembled to address each and every detail in the photo to ensure that nothing was out of place.”

The team spent a year investigating the photo, and even found the location where it was taken, in Chaves County, New Mexico. There they unearthed the remains of the building shown. “We found the old lumber underneath,” said Jeff Aiello, director of a National Geographic Channel documentary on the find, scheduled to be broadcast this month. “We found those exact rock piers are still there.”

Liz Larsson, from the UK’s Croquet Association, said the series of photos from the scene left little doubt what game was being played: “It’s clearly croquet. You can see the hoops, the balls, the mallet, the centre peg. They’re all there. It’s a fascinating picture.”

The first croquet club in England was founded in 1865, the same year the game was immortalised in Lewis Carroll’s Alice in Wonderland, Larsson said.

“Croquet became popular in the 1860s because it was the first sport that women could play on the same terms as men, and men and women could play each other. It had a huge boost in its popularity.” In the UK, however, it was still not a game for the masses: “Not really. You needed a lawn, and a fairly large one.”

Things were, however, slightly different in the US, where companies making croquet gear created a smaller-scale version of the sport, which could be played on rougher turf, using cheaper, lightweight equipment.

During the 19th century, the game in America had a somewhat different image to the genteel, cucumber-sandwich stereotype of Britain, according to a history by the United States Croquet Association: “Croquet as a public sport suffered a setback in the 1890s when the Boston clergy spoke out against the drinking, gambling and licentious behaviour associated with it.”

All types of Americans played. In 1867, General George Custer wrote to his wife, Elizabeth, from his frontier fort in Kansas, asking her to “bring a set of field-croquet” when she next visited.