Kez was taken from her owner and held in the Edinburgh Dog and Cat Home
A sheriff has said a collie which was placed in a dogs' home after trying to bite police officers should be released on compassionate grounds.
Robert Armstrong, 56, has been kept apart from his dog Kez since last Christmas, when they were living rough.
The Edinburgh Dog and Cat Home said Kez had a cancerous lump removed in June.
Armstrong was earlier found guilty of being in possession of a dangerous dog but sheriff James Gilmour ordered the release of the dog back to him.
Sentence on Armstrong was deferred at Edinburgh Sheriff Court for six months for him to be of good behaviour.
Defence solicitor advocate Duncan Hughes said that, at the time of the offence, Armstrong had been living rough and Kez was his only companion.
He had now moved into the Bruntsfield Hostel and had visited Kez every week.
Mr Hughes explained that Armstrong had worked all his life until he contracted multiple sclerosis. He was now confined to a wheelchair.
"He (Robert Armstrong) told me he is so attached to Kez that he would prefer to live rough again, rather than stay in the hostel with no dog".
A letter from the Dog and Cat Home shown to Sheriff Gilmour stated that since Kez had arrived there, the staff had witnessed no behavioural problems.
It read: "She is a normal dog with no issues, who has shown no aggression to any of our staff.
Kez, the letter said, had an operation to remove a cancerous lump in June of this year. It added: "We cannot guarantee that the cancer will not return at any time in the future.
"In our view, it would be in everyone's best interest if she could spend the remainder of her life in her rightful place with her owner."
However, the Dog and Cat Home said it could not release Kez to Armstrong if he did not have a fixed address.