During the last year of our relationship, every fight my ex and I had ended the same way, with our rescue mutt, Tilly, cowering in the corner. Exhausted and defeated, the only thing we had left in common was how bad we felt for upsetting our anxious corgi mix, so we’d re-up on a few more months of mutual unhappiness out of guilt.

When I eventually moved out, we agreed it made more sense for Tilly to stay in the apartment instead of crashing on couches. As soon as I was settled, though, I wanted some form of visitation. My ex came around, and we agreed I would get to watch her when he went out of town. Over time, this convenience allowed him to travel more, and I was more than happy for the extra days with Tilly.

As more couples opt out of or delay the traditional markers of relationship maturity (marriage, babies), many of them seem to be compensating by adopting dogs instead. When unmarried couples decide to split, however, without the formality of an official legal process to divide up the assets, figuring out who gets to walk away with the pets in tow can be especially dicey. After all, divvying up that semi-decrepit living room furniture you two found on the street is probably much less contentious than hashing out who gets the loyal Labradoodle. So, as a solution, more couples are opting to do what my ex and I did and work out an agreement wherein the dog’s time is split between both people—a dogvorce, if you will.

Besides, owning a dog requires a lot of time, work, and money—sometimes too much for one person to manage on their own. The same wage stagnation, student debt, and declining home ownership that cause couples to delay or opt out of parenthood make solo dog ownership more challenging as well. It’s not entirely surprising that millennials have figured out a way to combine these shortcomings.

When Shanna Olson broke up with her ex-fiancé ten years ago, she had no intention of sharing custody of their Pomeranian, named Kobe—that is, until she planned a vacation to Spain that she could not comfortably take without the right person to watch the dog. “I wouldn’t have been able to go if I didn’t trust [my ex] Greg so much to watch Kobe,” Olson said. “I knew he loved him as much as I do.”

In fact, their arrangement worked out so well that she got two more dogs—and Greg would watch all of them when she traveled. When all three pups eventually passed away over the years, she was too heartbroken to get another dog. The two drifted apart until recently, when they ran into each other through mutual friends. He persuaded her to get another Pomeranian, named Yum Yum, whom they now co-parent together. A decade and several small dogs later, he has keys to her apartment, visits once a week, comes by whenever Olson has to work late, and watches Yum Yum when she’s out of town.

“I wouldn’t have gotten him if Greg didn’t push me to get another dog,” Olson said. “I’m so glad I did.”

One survey found that one in 20 pet owners in relationships have a “pet nup,” a custodial agreement that stipulates who gets to keep the pet, and can also cover things like visitation schedules, ownership of vet bills, who gets to make decisions about their health, and more. Although precedent for pet nups has largely been set by married people, because dogvorces have become more common and the case law around them grows more nuanced, the parameters now apply to unmarried, cohabitating couples as well.