I fell in love with him through the chain-link fence: German shepherd face, Rottweiler markings, huge clumsy paws.

It was March and still chilly in Missouri, but they kept the pups outside at the animal shelter anyway. I don’t remember how we ended up there, at that shelter in rural Callaway County — I think we were just taking a Sunday drive when I saw the puppies and screamed that we had to pull over. Once I saw that puppy, I had to have him; I’d just lost the sweet dog I’d had since first grade a couple of months before, and I was ready for a new pet. But it was Sunday, so the shelter was closed.

“We have to come back first thing Monday to get him,” I told Jamie, my then-fiancé-now-ex-husband. “I don’t want to risk anyone else getting here first and adopting him out from under us.”

Why I thought there would be some kind of bidding war for a 4-month-old mutt in a muddy yard in the middle of Missouri, I’m not sure, but that’s how my brain works, and so we were back at the shelter — a 30-minute drive from our home in Columbia — at 8 that Monday morning.

They handed him over to us with little fanfare — we gave them $12 in cash; they slipped a thin red leash over his head — and he was ours.

This was 2003, and I sat that night curled up around the dog we named Loki for the Norse trickster god and watched the “shock and awe” unfold in Iraq.

For the next three years, Loki was my baby. Even as he grew to 100 pounds, I cradled him in my lap. Every day before I left for work, I’d make sure to fill his Kong with peanut butter, and every day when I came home, I’d take him to the dog park. I called him my “babiest of babies” along with about a million other ridiculous pet names, and I researched brands of dog food to find the best one for large-breed dogs. For his birthday, I made him a cake out of minced liver; at least once a week I made him from-scratch dog biscuits. We bought him presents at Christmas and hung his diploma from obedience school on our wall. I once, foolishly, ran out onto a barely frozen pond after Loki fell through the ice while chasing some geese because the idea of not rushing out there to yank him out by his collar was unthinkable.

“I just can’t bear it sometimes,” I told my mom one day while we walked Loki on his favorite nature trail. “I love him so much, and he’s going to die one day. Why can’t dogs live as long as humans. It’s just not fair.”

“By the time he dies,” she told me, “I expect you’ll have kids to distract you. And you’ll honestly be too worried about how the kids are taking it to truly mourn. I’m not saying you won’t be sad, but kids will put it into perspective.”

I didn’t believe her.

Then, in 2006, I had Ruby.

This is a familiar tale — Loki’s walks stopped altogether for a period of time and when they resumed, they were much shorter. He no longer got birthday cakes or homemade dog treats, and in the morning scramble to get Ruby to day care, I hardly ever remembered to fill his Kong.

This is not to say that he wasn’t still very much a part of our family. He paced the floor with me while she cried; he slept on the floor by Ruby’s crib; he nudged her swing with his nose to try to push it; he was incredibly tolerant as she learned to pull herself up on his fur and yanked his ears and stepped on his tail. And he was rewarded: When she said her first word, it was not “mama” or “dada.” It was “Oke,” for “Loki,” said while enthusiastically patting the sofa to encourage him to climb up for a snuggle.

Over the next four years, Loki was no longer our baby, but he was still very much our beloved family pet. Sometimes, when Ruby was being especially horrible, I’d lift his ear and whisper, “You’re still my favorite, buddy” or “Maybe I should’ve stopped with you, sweet boy.”

Then, in 2010, Jamie and I divorced.

In the brutal aftermath of our divorce — we weren’t particularly awful to each other, but divorce is always brutal — I was too worried about Ruby, about how she was coping, about what her custody schedule would be, about how to meet her needs to even give Loki much thought. Jamie stayed in the house, and I moved into a no-pets-allowed rental, so there wasn’t even anything to discuss. My babiest of babies became Jamie’s dog.

A couple of months after the divorce, Jamie went out of town, and I agreed to watch Loki; I drove over to my old house, laid down on the floor next to Loki, and cried for about an hour with him nestled next to me, just like he’d been that night in 2003 when, as a puppy, he’d snuggled with me as I watched the airstrikes in Baghdad, just like he’d been after my miscarriage and after Katrina and after any of the big fights that preceded the divorce.

As the years passed, I mostly only saw Loki when I’d drop Ruby off at her dad’s or pick her back up. He still ran to greet me, and I still thumped him on the side and rubbed his ears, but he was no longer my dog, not really.

Then, on Saturday, I got a text from Jamie in St. Louis. “Loki’s dying,” it said. “I’m taking tomorrow morning off of work to send him off.”

Sunday morning, early, Ruby and I called Jamie on FaceTime and whispered our goodbyes as Jamie stroked Loki’s ears. He was too weak to even lift up his head when he heard our voices, and Ruby and I hung up and cried while Jamie carried him to the vet for his final appointment.

But then I spent most of Sunday crying — not huge gulping sobs, but just quiet tears slipping down my face that I couldn’t quite seem to stop — while Ruby bounced back quickly.

I think I was mourning all of Loki’s life that I never got to be a part of, sad for how much he had meant to me once and reflective on how much my life had changed since 2003.

Ruby came over to me and wiped my face. “Mom!” she said. “It’s OK. He was almost 14. He had a good life.”

I thought back to what my mom had told me all those years ago, that I’d be too worried about my kids to mourn Loki. It seemed like maybe she had it backward.

“Are you OK?” I asked Ruby. “I mean, he was more your dog in the past few years than mine.”

“I’m fine,” she said. “I’m sad, but I saw this summer how old and sick he was getting, and I think I must have gotten all my tears out then. I’ve been ready for this for awhile. And now I think maybe that was part of the plan because now I  can take care of you while you’re sad.”

And so I let her. I lay down, with Ruby snuggled next to me, right where Loki used to be when I needed comfort, and she blotted my face with tissues and laughed when I blew a snot bubble from my left nostril and then we both started laughing and then things were mostly OK again.

Loki, if there’s a dog heaven — and there better be because if dogs aren’t allowed, I don’t want to go — I know that you’re up there chasing geese and deer and cats and pigs and that your Kong is always full of peanut butter and your days are full of car rides and belly rubs.

And I want you to know that you were the best $12 I ever spent.