HE is the long-haired Skye terrier who became a symbol of loyalty and devotion in the 19th century, famously spending 14 years guarding the grave of his beloved owner until his own death.

Greyfriars Bobby's legacy has endured through the ages and a life-size statue in his honour and the nearby graves of both Bobby and his owner, John Gray, remain popular tourist attractions in Edinburgh, while his story has been passed down through the generations.

Today, a piper will play a moving tribute to the little dog, to mark the 150th anniversary of his death on January 14, 1872, at a memorial service in Greyfriars Kirkyard.

After Edinburgh Castle's One o' Clock gun fires, a posy supplied by the Dog's Trust will be laid at Bobby's grave, before the skirl of the pipes echoes around the cemetery in honour of the historic pup.

Greyfriars Bobby, was born in 1856, and was owned by Gray, a police constable, accompanying his master on duty as he patrolled the pens at the Cattle Market and Grass Market in the city to ensure that there were no thefts.

The police were expected to patrol in pairs and to have a watchdog, which was bought for them by the constabulary.

Bobby and his master were a familiar sight on the cobbled streets of the capital as they went about their business togther, but sadly they had only a short working life together when Mr Gray died of tuberculosis in 1858 and was buried in Greyfriars churchyard.

Bobby's devotion was such, though, that he spent the rest of his life by his master's side, with residents keeping an eye on him and bringing him meals.

Eventually, a shelter was built for him by the grave to keep him safe from the elements.

And legend has it that almost on a daily basis, crowds would gather at the entrance of the Kirkyard waiting for the One o’Clock gun, at the sound of which, Bobby would leave the cemetery and head for a coffee house where he had gone with Gray in the past, where he was given food and water.

When his time came, the devoted dog was buried just inside the gate of Greyfriars Kirkyard, not far from his owner's grave.

English philanthropist, Lady Burdett-Coutts, was so moved by the story that she had a drinking fountain, topped by a statue of Bobby, built opposite the entrance to the churchyard to commemorate him, crafted by sculptor William Brodie. A a bar named after the dog sits just across the cobbles in a row of Georgian houses adjoining the historic Candlemakers' Hall.

Representatives from George Heriot’s School and Jack Johnstone, regional manager of the Dogs Trust, will also make speeches in praise of Bobby.

In 1912, American author, eleanor Atkinson, wrote a novel, Greyfriars Bobby, based on the true story, which was then turned into a Disney film in 1961, starring Donald Crisp and Laurence Naismith.

The story found life on the silver screen again in 2006 with "The Adventures of Greyfriars Bobby" taking to the silver screen, starring Christopher LEe and Gina McKee.

The nearby church, Greyfriars Kirk, first opened its doors on Christmas Day in 1620 and last year celebrated its 400th anniversary.

Many notable individuals are buried in the kirkyard including James Hutton, considered the father of modern geology, and also William McGonagall, famous for being the ‘worst poet’ in history.

Today the area is also known for the neighbouring Grassmarket Community Project, an award-winning social enterprise that provides a vital lifeline to those experiencing issues around addiction, poverty, homelessness and mental health.

Bobby's gravestone was put in place by The Dog Aid Society of Scotland and unveiled by Prince Richard, the Duke of Gloucester, on May 13, 1981. 

The memorial is inscribed “Greyfriars Bobby – Died 14 January 1872 – Aged 16 years – Let his loyalty and devotion be a lesson to us all”.