While El Refugio deploys rescue missions in Madrid, the fates of other pets in Spain often hang on word of mouth: a neighbor asking around if somebody can help, an emergency worker trying to locate a relative. Typically, if the owner has a chance of recovery, the new arrangement is temporary.

For Antonio Viñas, 46, hospitalized in Madrid, “it just all happened a bit too suddenly” to make contingency plans for his dog, Augustus, a white German Spitz with a cream-colored face. Augustus was placed informally in the home of nearby residents, as many emergency placements have been made in Spain.

The neighbors, Ariel Framis, 15, and his mother, Alicia, had never met Mr. Viñas, but they agreed to take in Augustus after hearing from a friend that a dog in their neighborhood urgently needed care.

Now, Ariel and his mother send daily updates to Mr. Viñas, sharing photos and stories about Augustus that “clearly bring some joy to his hospital bed,” Ms. Framis said.