Hamish McHamish, a 15-year-old stray, has wandered in and out of people’s homes in St Andrews for 14 years, taking food and shelter wherever he can find it.
He had become the town’s collective pet and locals decided to immortalise the ginger tom cat in a life-size bronze statue last year, similar to that of Greyfriars Bobby in Edinburgh.
But his fame did not save him from being chased by two dogs and forced to take refuge 20ft above the street.
When Hamish refused to come down, residents organised a rescue mission.
Staff from a nearby hairdressers held a ladder while a student climbed into the branches to bring Hamish back to earth.
One salon worker, who did not wish to be named, said: “One of the girls saw Hamish getting chased by two small dogs. Hamish then darted up the tree. We went outside with his cat treats and tried to entice him down.
“He was trying to balance on really small branches. Luckily two students offered to help and got the ladder from the back of the shop so he could climb up and get Hamish.”
She added: “He wasn’t hurt by his ordeal. People cheered when he was finally down. He was up there for around 20 minutes.”
Hamish himself thanked fans on his Facebook page, saying: “I was just testing to see if you were paying attention! Pesky dogs.”
When Hamish was one-year-old he left owner Marianne Baird for a nomadic lifestyle.
Ms Baird ensures he gets a yearly vet check-up but otherwise the cat roams the town.
Flora Selwyn of St Andrews In Focus magazine came up with the idea for the statue. which Kilmany-based sculptor David Annand made after locals raised £5,000.