An Edinburgh widower who was struggling with mental health issues due to the isolation of lockdown has walked 2,000 miles in a year after his doctor prescribed that he join the Ramblers.
Jim Snodgrass, 84, from South Queensferry, said he was expecting to receive medication for his anxiety.
But instead all he was given was the Ramblers' phone number.
Dr Victor Jack said he recognised that Jim needed "social connection" not pills.
Jim, whose wife Sheila died six years ago, said he broke down during the first Covid lockdown in March 2020.
The grandfather-of-two said: "I was not feeling good as I was bothered with my nerves so I called the doctor and that's when I burst into tears on the phone to the receptionist.
"She was so nice to me and got the doctor to call me.
"I was surprised when he didn't give me any pills and instead gave me the number for the Ramblers."
Jim said members of the Ramblers met him for socially distanced walks.
During lockdown doctors could give exemptions to people who lived on their own to meet one other person outside. Then last summer people were allowed to meet in groups to walk.
Currently groups of 15 people are allowed to meet outside.
He said: "The Ramblers saved me during the last year of lockdowns. I don't know where I would be without them with my nerves.
"Within two miles of walking I'm a different person.
"Dr Jack is an amazing man as he has saved me from my nerves in the lockdowns with this idea of his."
Jim has walked between four to five miles a day in the last year with 12 miles being the most in one day.
He said: "I even went out when the roads were icy and always stayed within a five mile radius of South Queensferry during the lockdowns.
"I hope my story helps someone else who is feeling bad so they know to join their local Ramblers group too."
Dr Jack, of South Queensferry Medical Practice, told BBC Scotland he used his own experience of stress to decide the best course of action to tackle Jim's symptoms.
He said: "When Jim told me he liked walking but that he had been walking on his own I was aware that he was actually quite socially isolated as his wife had died.
"He was benefitting from the physical part of walking but not the social side.
"A few years ago I joined a running club and found it very helpful for stress.
"This has made me recognise that any sports club has a benefit particularly through the social connection it provides."
Dr Jack said he had seen many patients who had been suffering with mental health issues during the lockdown particularly in those working from home.
Jim, who has hearing loss, was knocked down by a cyclist on a trail so the Ramblers have made him a sign warning people he is "hard of hearing", which he wears when he is out walking. He has walked 2,049 miles (3,298km) since March 2020.
Brendan Paddy, Ramblers Scotland director, said: "Jim is truly an inspiration to us all. It's amazing to see how he's improved his health and happiness by getting active with his local South Queensferry Ramblers group.
"Clearly lockdown has been a hugely challenging time, yet we know that many more people like Jim are discovering the revitalising power of walking - with booming numbers enjoying Scotland's outdoors.
"I'd urge anyone who'd like a bit more adventure, friendship and fresh air in their lives, to give the Ramblers a go."