A Hawick woman has been banned from keeping animals for 10 years and placed on probation for 12 months following a Scottish SPCA investigation.
Catherine McGillivray, of Queen's Drive, admitted failing to provide a clean environment and nutrition for her dog earlier this year.
Scottish SPCA inspector Jenny Scott said, "The conditions the dog were being kept in were horrific and the worst I've ever seen.
"There were literally piles of rotting faeces on the urine-soaked floor, which was absolutely disgusting.
"The dog was thin and hadn't either been given a proper diet or been taken to a vet.
"It also had an ulcer on its scrotum caused by the urine and faeces on the floor and its paws were inflamed.
"We have since been able to find the dog a new home, where it is being looked after properly."