If it isn’t the cardinal rule of retirement planning, it’s certainly high on the list: You never dip into your retirement savings early. That’s critically important to anyone looking to ensure a financially steady, secure retirement; if you dip into your IRA or 401(k) before retirement, you could potentially jeopardize your entire savings plan.

This wisdom about holding fast and not dipping into your retirement savings prematurely is oft-repeated, and not without reason. There are many pre-retirees who do tap into their accounts before they should, perhaps anxious to pay for a child’s college tuition, to pay off the mortgage, or to fund a massive home improvement project. Everyone’s situation is different, of course, but generally speaking these are going to be poor reasons to raid your retirement accounts early.

But are there ever acceptable times to dip into your retirement account prematurely? You should always consult with your financial planner first—but the short answer is that yes, there are occasional, isolated incidents in which people do get into their accounts early, and it proves the smart thing to do (or, in some cases, the only real option).

For example, you can take penalty-free distributions from qualified retirement plans if you become either totally or permanently disabled.

On a related note, if medical issues begin to stack up and your healthcare bills become burdensome—as in, more than ten percent of your adjusted gross income—you may find that dipping into the retirement account is your only solution. In some circumstances, distributions will be penalty-free.

Finally, if you’re getting a divorce, you may be required to split your retirement account in half and distribute part of it to your spouse; when ordered to do so by a court, you can at least rest assured that you won’t be penalized for the distribution.

There are a couple of other instances in which retirement accounts are commonly raided—and while we do not recommend them, we do want to note them:

Some entrepreneurs use their retirement savings to help fund a new business venture.
Some use their retirement money to buy their first home; to a certain extent, this money can be claimed without tax penalty.
While both of these scenarios are possible—even common—we would recommend against them. Withdrawing from a retirement account early is something to be done only when it is absolutely necessary—and never without the consultation of a financial planner.