For around 150 years, tourists to Edinburgh have taken time out of their trip to visit the bronze statue of Greyfriars Bobby, the Skye Terrier reputed to have kept a 14 year vigil at his master's graveside.
But now a historian at Cardiff University believes he has uncovered evidence that the legend is nothing but a shaggy dog tale.
Dr Jan Bondeson looked into Bobby as part of the five-year research for his book, Amazing Dogs, which also looked at Nazi research into what they believed to be super-intelligent canines.
However, Bobby's life story revealed itself to be so murky, that Dr Bondeson decided to devote a separate book to debunking the myths.
"The entire story is wrong - the account of the dog on the drinking fountain who supposedly kept vigil at his master's grave in all kinds of weather is not accurate," said Dr Bondeson, a social historian, originally from Sweden.
"Bobby would go out hunting rats in the church and was kept well fed by the locals. He was not a mourning dog at all - he was a happy little dog."
Until now it was believed that Bobby had been the pet of Edinburgh constable John Grey, who died of tuberculosis in 1858.
His period of mourning reputedly lasted until Bobby's own death in 1872; which was the first aspect of the story to make Dr Bondeson suspicious, as Skye Terriers typically only live 10 to 12 years.
As he delved deeper into contemporary sources, Dr Bondeson discovered that there were distinct differences in photos and paintings of Bobby, which fell into two groups, those before 1867 and those after.
"I noticed that the two dogs looked quite different. The first Bobby was quite an ugly dog but in later paintings he looks just like the statue on the drinking fountain," Bondeson said.
Research into the minutes of meetings at Edinburgh City Council revealed that the truth about Bobby, both mark I and II, was known at the time.
But by this stage the legend was attracting so many tourists to the Scottish capital, that councillors chose to ignore it.
It appears that the original Bobby had been a stray mongrel which hung around the nearby George Heriot's Hospital.
When he became a nuisance there, the hospital gardener dumped him in the grounds of the kirk, where he was adopted by curator of the graveyard, James Brown.
Newspaper reports of the time tell of how, for a tip, Mr Brown would beguile visitors with Bobby's Tale.
In return for free food for both Bobby and new owner, Mr Brown would then guide tourists in the direction of a local restaurant owned by John Traill.
Dr Bondeson believes that, when the first Bobby died, it was Traill's idea to replace him and keep the lucrative arrangement going.
"After an article about Bobby appeared in The Scotsman, visitation rates to the graveyard increased by 100 fold," said Dr Bondeson.
"They would give James Brown a handsome tip and have lunch in the Traills' restaurant."
"But a dead Bobby was no good for business, so they replaced him with a pure-bred Skye terrier who lived for a further five years until 1872. After which time, it did not take long for the fountain to be erected."
The story of Greyfriars Bobby has inspired three feature films - including a 1961 Disney version - and several books.
Meanwhile, a spokesman for VisitScotland, said: "The story of Greyfriars Bobby is the stuff of legend, and has been the subject of Hollywood movies, television programmes and numerous books.
"Separating fact from legend is always going to be tricky but regardless of how much the story has evolved over the years it has done little to deter visitors paying homage to a true Scottish icon.
"I'm sure that visitors to Edinburgh will continue to be inspired by Bobby's story and he is worthy of his place in Scottish history."