London An unseen Sherlock Holmes story, in which he solves the mystery of where Dr Watson is going on his travels, has been rediscovered more than a century after it was published.

Sir Arthur Conan Doyle wrote the 1,300-word tale in 1904 for inclusion in a compendium of short stories sold to raise funds to replace a bridge in the Scottish Borders town of Selkirk. The bridge, known as the Wood Brig, had been destroyed in the great flood of 1902. Two years later, residents organised a charity bazaar, inviting Conan Doyle to open it and to contribute a story.

Sherlock Holmes: Discovering the Border Burghs and, by deduction, the Brig Bazaar was duly included in a 48-page pamphlet alongside stories by local people. It bills Conan Doyle as “the famous littérateur”. One copy later found its way into the possession of Walter Elliot, 80, who recently rediscovered the pamphlet tied up with string beneath piles of books in his attic in the Scottish town. Elliot, a great-grandfather, said: “I’ve had this book for about 40 or 50 years. I must have got it from a friend because I can’t remember buying it from anyone,” he said. The retired woodcutter said his family had told him the story of Conan Doyle coming to town.

“In Selkirk there was a wooden bridge that was put up some time before it was flooded in 1902. “The town didn’t have the money to replace it so they decided to have a bazaar to replace the bridge in 1904. “They had various people to come and do things and just about everyone in the town did something,” he said. “I have no idea how many copies they made and sold. I have no idea if it has ever been published — I’ve never seen it. “I’ve always been interested in history and my family has always passed on stories and I suppose this was one of the stories that was passed down.”

In the story, Dr Watson tells Holmes that he is planning a trip to Scotland. It turns out that Holmes already knows this, and has pinpointed his travels to Selkirk “in aid of a Bridge”. “My dear Watson,” he adds, “it’s all a matter of deduction” and then details his methods. Clues dropped by the unwitting Watson include murmuring The Flowers of the Forest, a lament about Scotland’s catastrophic defeat in the Battle of Flodden in 1513.

Holmes says: “I in turn consulted an authority on the subject, and found that that lovely if tragic song had a special reference to Selkirk [where only one man was said to have returned from the battle]”. Watson also left a faint pencil mark on a stanza in Macaulay’s Lays of Ancient Rome (“As you know, Watson, the lay is all descriptive of the keeping of a bridge.”).

Holmes continues: “I ordered in a ton of tobacco, wrapped my cloak about me, and spent the night in thought. When you came round in the morning the problem was solved — Watson, you have the Border Burghs in your eye!” The Borders area was close to the Edinburgh-born writer’s heart. He returned a few months after the sale with a cricket team to play Selkirk.

In 1905 he presented the Border Amateur League with a football trophy, the Conan Doyle Cup, which has since been lost. In 1906 he stood unsuccessfully as a Liberal Unionist candidate in the nearby Hawick Burghs constituency. The short story is now on display at the Cross Keys Selkirk Pop-up Community Museum in Selkirk, along with Elliot’s paintings of the bridge.