While most homebuyers are married couples, about 15% of young homebuyers in the United States are unmarried couples purchasing a home together. In metro areas with hot housing markets like Tampa, Portland, and Washington, D.C, that number is even higher.

With housing prices on the high side and mortgage interest rates at record lows, it can make a lot of sense to pool your resources with a partner to purchase a home together, even if marriage isn’t in the cards.

Home shopping is fun, but buying a home with another person is a big deal. In some cases, it’s genuinely easier to get a divorce than to remove one party from a shared mortgage. Legal frameworks designed to protect property rights for married couples don’t always work well for unmarried property owners. So before you sign those loan documents, make sure you’ve considered these steps for unmarried co-homebuyers.

Learn about your partner’s financial history.

When you apply for a mortgage, you’ll each need to provide detailed information about your income, assets, and financial obligations.

So before you hit up a lender, talk to your partner about your banking and savings accounts, credit card balances, investment and retirement accounts, and student loan debt.

Now is the time to fess up if you have any financial skeletons in your closet. Disclose any past bankruptcies, delinquencies, or legal judgments. Be specific about account balances, and make sure you have a clear picture of your partner’s finances, too. Finances are personal, and discussing financial details can be tough, but you’ll want to avoid any surprises when it’s time to procure financing for your home.

It’s also important to learn about your credit scores. If you and your partner have wildly different credit scores, most lenders will use the score from the partner with worse credit to determine whether they’ll be willing to give you two a mortgage, and at what rates.

If your partner’s credit isn’t great, it can be tempting to just put the person with the better credit on the mortgage alone. But that leaves only one of you with the obligation to pay that mortgage back.

Make a plan for divvying up home expenses.

It’s a good idea to decide ahead of time how you each plan to contribute to house-owning expenses like maintenance and insurance. If you and your partner don’t currently have a shared household budget, now is the time to make one. Talk about how you’ll pay your mortgage if or when one if you becomes sick or unemployed. Plan on building and maintaining a house emergency fund together.

If one of you will be paying the bulk of the mortgage, make sure you two understand how that will impact your combined expenses and financial responsibilities. (Perhaps one partner pays the mortgage, while the other partner pays the utility bills.)

While the two of you may not currently share a bank account, it’s a smart idea to set up a joint account for house-related expenses. Sending in mortgage payments from separate accounts can be a pain, and keeping track of who paid for what over the years you’ll own your home will be easier with a single, shared home-expenses account.

Call the lawyers, and get it in writing.

contractContact a real estate attorney and set up a property agreement with you and your partner before you buy a place together. You can think of it as a prenuptial agreement for your home.

Your property agreement should address:

How much of the house does each of you own? If one of you will be providing a large down payment, or if the plan is that have one partner pay more toward the mortgage than the other, you might agree to split ownership in your home proportionally.

How will you list title on the deed to your home? As unmarried co-homeowners, you’ve got a couple of options.

You and your partner can be listed in the title for your home as joint tenants.

Joint tenants have equal shares of ownership in the property. If one of you dies unexpectedly, the homeownership passes to the surviving partner.

Tenants in common can own the home is some split that isn’t 50/50. If one of you dies, that person’s share of the home goes to his or her estate, which may or may not be the surviving partner, depending on the deceased partner’s will. This can be a good option for late-in-life partners who want their children to inherit a stake in the property.

Your property agreement should also cover how you’ll handle your shared property if you and your partner decide to end the relationship.

Decide what you’ll do if your relationship sours.

Breaking up is hard to do. It’s even harder if there’s a mortgage involved.

Removing someone from a mortgage requires refinancing.

If you’ve got little equity in your home, if your personal finances take a downturn, or if (gulp) your home’s value goes down and you owe more than your property is worth, it can be very difficult to be rid of a co-borrower with whom you no longer want to own a property.

The good news is that the easiest time to figure out what to do if you’re going to break up is when you’re happy with your relationship. (It does not get easier to iron on these details when you are heartbroken.) So before you buy a home together, you’ll want to discuss a plan for what would happen if you two decide to break up and get those details in your property agreement contract.

Will you sell the house? Agreeing to sell the home if either you or your partner decide to end your relationship is probably the most straightforward option. You can choose to split the proceeds evenly, or in proportion to what each partner put in. Though If you go with a proportional split, define that clearly in your property agreement. It wouldn’t be unfair for the partner who provided a large down payment to get a larger share, for example, but don’t forget to account for any major maintenance or home improvement costs that you’ll incur together along the way.

If one of you wants to stay in the home after you split, can one partner buy out the other’s interest in the property? This can be trickier than agreeing to just sell the place if you break up.  To go this route, you’ll want to make sure your property agreement clearly defines how much one partner would need to pay the other for their share of the home. (You’ll probably want to include a requirement for an independent appraiser.)

Make sure you agree on a reasonable time frame—say, 12-18 months after the relationship ends—and be sure you’re your agreement requires the remaining partner refinances the mortgage to get the departing partner off the note.

No one likes to think about ending a relationship, but for unmarried couples buying a home together, ironing out how we would deal with a future break up is absolutely critical.

Don’t forget about the tax benefits.

Once you’ve purchased a home, you and your partner could be eligible for tax credits for the interest on your shared mortgage.

Current rules stipulate that either partner on the mortgage can claim credit for the mortgage interest paid, or that you and your partner can split the credits, even when filing your taxes separately.

Just be sure that together you don’t claim more than your combined total mortgage interest, and double-check with your tax preparer: rules for mortgage deductions change every now and again.

Remember: mortgage lenders finance homes for unmarried couples all the time.

You can buy a home with just about anyone: a romantic partner, of course,  but there’s nothing stopping you from buying property with your brother, your cousin, your best friend since the third grade, or your financially-savvy sorority sister. And unlike your nosey Aunt Frieda, banks and mortgage lenders don’t really care whether you’ve got rings on your fingers when they are evaluating your home financing prospects as a couple.

With some careful planning, you and your partner can be happy homeowners.