When you’re unemployed, you’ve run out of savings and your unemployment check can’t cover the bills, where is the next place you should turn for money? You don’t want to take on expensive credit card debt. You can’t get a loan when you don’t have an income. So do you sacrifice your future and withdraw from the 401(k) plan you had at your last job? Or do you swallow your pride and ask Mom and Dad or another relative for a loan? Neither option is ideal, but here are some considerations to help you decide.

Unemployed! Can Your Parents Afford It?

Your parents might be the type who are willing to help you in any way they can. Still, think twice before accepting their generosity. “The most important thing to consider is where the money your parents are giving you is coming from,” says Misty Lynch, a financial consultant with John Hancock. “If they are wealthy and offer to help you out of cash flow or savings, that could be a good option, since any distribution you make from your 401(k) will be subject to taxes and penalties. You can repay them and start contributing to your retirement savings when you get back on your feet.”

What you don’t want is for your parents to lend you money that’s meant for their retirement. “If they spend down their retirement assets,” says Lynch, “they might not have any time to build them back up. Working into their 70s or 80s might be really difficult, and they might be forced to rely on you to help them out financially in the future. If you don’t want Mom and Dad living with you someday, it’s better to take the distribution from your own assets and make saving a priority when you get back to work.”

Establish Formal Loan Terms With Your Parents

Let’s say your parents can comfortably help you out. Borrowing money from family is still tricky. It could damage your relationship if you don’t repay the loan on time, especially if your parents don’t agree with how you’re spending the money or conducting your job search.

Experts say you can minimize potential conflicts and prove you’re serious about repayment by spelling out expectations up front in a formal, written contract. “The child should also pay interest to the parents, similar to what they would pay for borrowing from their 401(k),” says Ashley M. Micciche, CEO and retirement plan specialist with True North Retirement Advisors in Clackamas, Ore. “Prime plus 2% is a good starting point.”

Other details, such as the repayment period and the amount of each monthly payment, should also be in writing, she says. The challenge is that the child may have no means of making loan payments right away. “The best option here could be to allow the child to defer payments until they find employment, while the loan accrues interest – which should help incentivize the child to find work soon,” says Micciche.

Dennis LaVoy, a financial advisor with Telos Financial in Plymouth, Mich., adds that discussing your short-term plan to find another job and decreasing your expenses as much as possible so your parents don’t feel you’re spending frivolously can mitigate family tension.

Minimize the Damage From a 401(k) Withdrawal

If a 401(k) withdrawal is your best or only option, how can you minimize the financial damage from the lost investment opportunity and early withdrawal penalties? First, keep taxes in mind. If you’ve already earned substantial income for the year, see if you can wait until next year to take a withdrawal, or at least limit your withdrawal to the bare minimum you will need to meet your essential living expenses for the rest of the current year. Of course, next year you may become reemployed and still owe substantial taxes on any 401(k) withdrawal, so always minimizing your early withdrawals is a sound strategy. (For more, see I have just been laid off. Can I use my 401(k) for living expenses now and report it as income next year?)

Second, consider alternative sources of funds. “If you have a Roth 401(k), you can take out your contributions – not the earnings on the investments – at any time without tax or penalty,” says Maggie Johndrow, a financial advisor with the Johndrow Wealth Group of Farmington River Financial in Farmington, Conn. Similarly, if you have a Roth IRA, you can withdraw contributions without penalty. (For more, see How to Use Your Roth IRA as an Emergency Fund.)

Third, keep the setback to your 401(k) balance in mind when job hunting. “I would suggest finding a job – or negotiating this when offered a job – that has a 401(k) that includes a high employer 401(k) match. This may help rebuild retirement savings,” Johndrow says. She also recommends contributing beyond the minimum required to get the employer match once you’re working again and funding an additional retirement account, such as an IRA, to offset some of the retirement savings you withdrew while unemployed. (For more, see How 401(k) Withdrawals Work When You’re Unemployed.)

The Bottom Line

“If the child is a responsible adult and has fallen on hard times, and this is not a recurring issue, then I would go to the parents for a loan and set up a payback plan in writing,” Micciche says. “The long-term impact of a withdrawal from a retirement account is very damaging, especially when it’s someone in their 20s and 30s.” For someone 30 years from retirement, a $10,000 withdrawal that would have grown by 8% per year means a sacrifice in retirement savings of more than $100,000. Also, as Johndrow points out, “You can borrow for almost anything in life – school, car, house – but you can’t borrow for your retirement.”

That goes for both you and your parents. However, you probably have more years to make up for lost ground than they do. A loan from your parents isn’t a bad idea, but you should take it only if they can afford it and you will repay the loan as agreed.