When you’re investing in a home with someone else, and that someone isn’t a spouse, experts say there are precautions you should take to make sure your interests in the property are protected:

Unmarried couples can choose to hold title to property in several ways: as joint tenants, tenants in common or with one partner as the sole owner, said attorney Lina Guillen, family law editor for legal information website Nolo.

Sole ownership might be attractive if one partner has bad credit, but it’s the riskiest option for the partner left off the title, she said. The owner can sell the home without that partner’s permission, and it can be tough to recover any of your financial contributions in court.

Joint tenants have equal interests in the property, with one partner’s share automatically passing to the other upon death. Tenants in common can own equal or unequal shares, which pass upon their death to a beneficiary of their choosing.

Tenants-in-common titling is the most common choice for unmarried couples, said Guillen, who is also a co-author of “Living Together: A Legal Guide for Unmarried Couples.” But it also means you’ll have to keep your estate plan up to date.

“If one partner dies intestate [i.e., without a will], his or her share won’t go to the partner,” she said. “It will go to the next of kin.”

This legal document sets out details of how you and your partner will share regular bills (such as the mortgage and utilities) as well as any unexpected expenses and capital improvements (such as replacing the broken fridge or renovating the bathroom), said John Slowiaczek, president of the American Academy of Matrimonial Lawyers.

Document how any unequal contributions will be handled in terms of dividing equity and gains when the property is sold, he said. If only one of you has an ownership interest and the other is merely paying rent, spell that out, too.

It’s also important to consider the effect of a breakup on the future of the home, said Guillen at Nolo. Including provisions like a first right of refusal to buy out the other partner’s interest or agreeing to enter mediation can help you sort out what happens next if only one of you wants the home, both of you do or neither does.

Keep in mind that holding your partner to the agreement generally means a lawsuit in civil court said the AAML’s Slowiaczek, who is also managing principal at Slowiaczek, Albers & Astley in Omaha, Nebraska. Have a lawyer draft, or at least review, the agreement to ensure whatever terms you set will be enforceable.

“It’s not something you do on a handshake, a kiss and a promise,” he said.

Typically, state law presumes you are equal owners unless there’s a written agreement to the contrary. Maintaining good records of contributions and payments can help you make a case to the contrary.

Depending on where you live, you may be able to note the share ownership (say, a 60-40 split) right on the deed, Nolo’s Guillen said. You may also be able to record your homeownership agreement with the county when you record the deed, or a short memo noting how you split ownership.

Maintain records over time of mortgage and interest paid. Even if your agreement spells out equal contributions, there may be cases where one partner covers for the other or takes on the cost of an emergency repair, she said.