If your goal is to retire early, cash flow will be a major consideration. How can you save for the future in a way that lets you access those savings at a younger-than-usual age? After all, most retirement accounts don’t allow penalty-free withdrawals until age 59 ½. And most pension and Social Security benefits don’t kick in until even later. What can a person who’s determined to stop working a bit earlier do in the meantime?

One option you might not have considered: permanent life insurance, such as universal life or whole life.

In addition to fulfilling the most basic function of life insurance—providing financial security for your loved ones in the event of your death—a permanent life insurance policy can be an important part of your early retirement toolbox. Sometimes called “cash value” insurance, this type of permanent life insurance has a savings feature within it that can potentially grow tax-deferred over time. This cash value (or “account value”) component allows you to make withdrawals or take loans from your policy that can be used as a source of steady income. Also, let’s say you end up retiring during a recession: If you have a universal life or whole life policy, the account value is not necessarily dependent on the market. So in that instance, it may be advantageous for you to draw on those funds for income versus your other investments. In this way, your life insurance policy can potentially be a hedge against market loss.

Ahead, we break down the details of how you might use permanent life insurance to help support early retirement goals.

Withdraw cash.

Most simply, you can take money out of your permanent policy’s cash value up to your “basis,” tax-free. Your basis is the amount of money you’ve paid into the policy with your premiums. It does not include interest credited to the policy’s value. For instance, if your cash value is $100,000 and you’ve paid $70,000 in premiums, you may be able to withdraw up to $70,000 with no income taxes due. Any amount you withdraw from the policy may lower the death benefit available to your beneficiaries.

So if you want to retire early and will need money to tide you over as you wait for the best time to access your other retirement accounts, purchasing a permanent life insurance policy and letting the cash value grow can be a smart move.

Take a loan.

A loan from your permanent policy’s cash value can also potentially be another source of funds in early retirement. The loan can be taken out of the account value as a lump sum or as a regular stream of withdrawals. Interest rates on these loans may be lower than loans from other sources, and the loan is tax-free (unless it is not repaid before the policy terminates). You also don’t necessarily have to pay back what you’ve borrowed (since you’ve borrowed from yourself)—though you will owe interest on the unpaid balance.

Another perk: You’ll continue to earn interest on the policy’s full cash value. That interest rate may potentially be greater than the rate you’re paying on the loan. For example, if you’re earning 4% within the policy and the loan interest rate is 2%, you’ll still earn 2% on what you’ve borrowed. Plus, you’re paying that interest to yourself. Finally, when you factor in the effect of paying income taxes on those tax-deferred earnings if you were to withdraw them in cash, the advantages of taking a loan can be even more evident.

It’s important to note that your policy can lapse if the total of your outstanding loan plus interest exceeds the cash value of the policy, so that’s something to keep an eye on. Any unpaid balance on the loan will also lower the policy’s death benefit by that amount. If your policy lapses, your loan (plus interest) will be considered taxable by the IRS, at your ordinary-income rate.

Cash out the policy.

Maybe you’re in a position where you don’t really need life insurance for the death benefit anymore. There’s no one depending on the payout after you die. there is a cost to maintain it. And all things considered, you’d prefer to make use of the policy’s cash surrender value to retire early.

If you decide to cash out the policy, you have two options.

First, you can surrender the policy. Surrendering your policy means you give it back to the insurance company for the cash value minus any surrender fees. You’ll pay taxes on any interest you’ve earned, and the policy—and thus the death benefit for your beneficiaries—will be terminated.

Another option is to sell the policy to a third party. This process is called “life settlement,” and it’s something to think carefully about because there are downsides. With life settlement, you’ll generally receive more than the policy’s cash value but less than the death benefit. After you sell the policy, you are still the insured person, but the buyer—the policy’s new owner—pays the policy’s premiums and receives the death benefit when you die. Many states regulate life settlements heavily, and it may not be a viable option in your state.

Life settlement is most often a choice for those forced to retire early due to poor health. That’s because the third-party market for life insurance is strongest for those with a relatively short life expectancy—typically of about 10 to 12 years. Having an asset you can sell if you find yourself in that situation may help to provide some financial reassurance. But the downside is your choice is irreversible and the profit you realize from a settlement—which is subject to income or capital gains taxes—may render you ineligible for need-based government programs such as Medicaid.

Keep in mind.

In order to take advantage of a withdrawal or a loan from your permanent life insurance policy, you typically have to wait for sufficient cash value to grow. You may need to own a policy for 10 or more years before that happens. If you decide you want to surrender or sell your policy, you should first consult the insurer and a tax professional for guidance.

In the end, the right permanent life insurance policy can be an invaluable part of an early retirement strategy, offering many potential avenues for both protecting and helping you realize your early retirement plans.