But sadly, the dog's owner was never to return as he died after being admitted to the hospital in Antequera in early November.
For two months the mongrel, a bitch around eight months old, survived on scraps from hospital visitors and staff until she was finally taken in by an animal rescue centre and found a foster home.
Photo: Patitas Andaluzas
"She spent days and days waiting at the door of the hospital not realizing that her master would never emerge to take her home," explained a spokeswoman from Patitas Andaluzas, the animal rescue charity that eventually took the dog in.
"Thanks to social media, her story has been spread and she has found a foster home in Madrid and is now looking for a permanent home."
The Spanish mongrel has been named Hachiko after a Japenese hound who famously waited years at a Shibuya station for his owner in a story made into a Hollywood film starring Richard Gere.