PORTLAND, Maine — If you've never said it yourself, you've at least heard it said; our pet is a part of our family.

But, what happens in a divorce or break-up?

The question comes after a woman from Bangor asked Maine's highest court to grant her co-custody of her ex-boyfriend's dog. A dog she says the two shared for a couple years during their relationship.

RELATED: When a relationship ends, who gets the dog?

According to divorce attorney Catherine Miller in Portland, there are a few options.

She says those who purchased a pet while married are able to work out a custody agreement during divorce court because it is technically a shared asset.

However, if you and your partner have no legal bind, things can get a little muddy if the relationship turns sour. 

"A couple could be together for 20 years and have a pet that’s 12 years old and it doesn’t give either person more right," Miller said. "The owner is going to win unless you have a cohabitation agreement and you have specified what the plan is for this pet."

That cohabitation agreement is something any couple can write up and work with an attorney to create. It's a lot like signing a prenuptial agreement before marriage. Miller says they are actually starting to be talked about more because fewer people are getting married.