(Originally written for DogWatch, a newsletter for the general public from the Cornell University College of Veterinary Medicine)

I travel a lot in my work and after I returned from a two-week trip, I discovered that my 6-year-old, spayed Chihuahua mix, Chili, has been peeing on the corner of my bed. Some people tell me it’s a medical problem while others say it’s behavioral. She’s a little baby as well as my best friend and I want to do what’s best for her, but I’m confused.

Approaching any problem that involves inappropriate urination as if it possesses both medical and behavioral components yields better results than taking an either/or approach. And both medical and behavioral components may elicit or result from bond issues which deserve attention, too.

To understand why this might be, let’s first view Chili’s problem as strictly medical. In that case, conditions such as a hormone deficiency, urinary tract infection, or some problem that causes her to drink more (such as diabetes) may cause her to accidentally urinate on her owner’s bed, and a medical work-up will pinpoint the cause. However, any medical problem that results in inappropriate elimination automatically sets her up for behavioral problems on two fronts. First, once Chili soils the bed, the scent of the urine may cause her to continue urinating there after any physical problem is resolved. Second, if her physical ailment makes her feel vulnerable and less able to protect her territory, she may begin marking her owner’s bed to communicate this sentiment, too.

On the other hand, suppose Chili begins marking the bed because something threatens her during her owner’s absence. Perhaps the pet-sitter her owner hired brings his own dog along, or maybe a noisy construction project begins in the apartment downstairs. In this case, the urine on the bed communicates, “Go away! I’ll fight to protect this!” to whatever sound, scent, and/or sight frightens the little dog. While such a message would seem to signal great courage, in reality animals who mark within their owners’ home communicate exactly the opposite: They really don’t want to fight at all and hope any intruder will catch a whiff of that message and run. Because the pet-sitter’s dog and the construction crew do, in fact, go away every day, as far as Chili’s concerned, the marking works and she continues doing it.

How could this behavior set Chili up for medical problems? Well, we know that frightened dogs may mark their territories numerous times daily. We also know that dogs who feel insecure in their space may only eat and drink the minimum amount, if that. We also know that stress elevates blood cortisol, a hormone from the adrenal glands, which can undermine the immune response. And, finally, we know that dogs caught up in protecting their space may not take time to groom themselves properly after eliminating. Putting these altogether, we can see how a stressed dog with a depressed immune response who repeatedly squats and eventually strains to urinate who also lacks the time to practice proper post-elimination hygiene could wind up with a urinary tract infection which would cause her to eliminate as well as mark in inappropriate places.

Additionally, the relationship between owner and dog often leads the animal to attach a strong emotional charge to the owners’ bed. Practically all, if not all, bed-marking occurs in dog-centered human-canine packs in which the dog feels obligated to protect the territory. Depending on the dog’s personality, the bed may serve as the first or last target.

Further complicating the bond effects, regardless when and why the mess on the bed appears, owners who discover dog-doo in their beds rarely react neutrally, let alone positively, to it. However, dogs who eliminate on the bed in no way communicate that they are spiteful, mean, or stupid; they communicate that they have a medical, behavioral, and bond problem that requires an immediate, knowledgeable, and caring response. Yelling at the dog or punishing it will simply make the problem worse. Instead, take your pet for a long walk to calm down and consider all the different reasons that could lead to this behavior. That mess on the bed could turn out to be a goldmine of information about your pet’s health and behavior, and your relationship.