Life is full of surprises—not all of them welcome. If you’re facing an unexpected financial surprise, it might be tempting to tap your retirement accounts for cash. Take it from us, there are plenty of better strategies.

“When you pull cash from your retirement account, you’re missing out on a market opportunity,” says Michelle Buonincontri, CFP, a financial coach in Anthem, Ariz. “That’s investment growth you might not be able to get back.”

If you need cash now, these 10 options can help cover short-term needs or pay for a financial emergency without depriving yourself of long-term growth in your retirement accounts.

1. 0% APR Credit Card Offers

Have you got good credit? If so, a credit card offering a 0% introductory rate for six to 12 months can be a reasonable way to cover short-term expenses. Check out the best 0% APR card picks, but make sure you have a plan to pay off the balance before the card’s regular interest rate kicks in.

“A few years ago, I knew I had a $5,000 payment coming up for the launch of my business,” says Brandon Hill, founder of Bizness Professionals, a blog for professional development. “Instead of shelling out $5,000 of my own cash, I applied for a 0% rewards card. The card essentially gave me an interest-free loan for 12 months, and thanks to the bonus reward, I received $750 cash back.”

One caveat with this method is that you must use it sparingly or it can affect your credit. You can’t just apply for a new card whenever you need funds. And if you think there’s a possibility that you’ll be unable to repay the funds before the promotional period ends, this is a bad option.

“Borrowers who have large amounts of debt on high-interest credit cards will find it extremely difficult to crawl out of a financial hole,” says Nishank Khanna, chief financial officer of small business lending company Clarify Capital.

2. Certificates of Deposit (CDs)

Certificates of deposit (CDs) are savings vehicles that offer you a fixed interest rate if you leave your money in them until a date of maturity. If you have CDs that have matured, you can obviously take the money out for any of your cash needs.

But if you have a CD that’s not quite mature yet, you can also withdraw your cash. Yes, you’ll probably pay a penalty, normally a few months of interest, but this may be substantially less than you would owe in interest for a loan of a comparable amount.

3. Health Savings Accounts (HSAs)

If you have access to a health savings account (HSA), you can withdraw money for eligible medical expenses, such as medical care, dental care, prescription drugs and payments for long-term care services. You can also withdraw funds if you kept receipts for past (unreimbursed) medical expenses.

Saving some of your emergency fund in a triple-tax-free HSA can be a good strategy, as long as you pay for current health expenses with already-taxed dollars and keep receipts to retroactively reimburse yourself later.

In a pinch, you can even use your HSA without these saved receipts, granted you’ll pay both taxes and a withdrawal penalty when the funds are used for non-medical purposes.

4. Personal Loans

Banks and credit unions offer personal loans with a fixed interest rate and repayment schedule, and rates are currently quite low.

“Personal loans are best used for one-time expenses such as credit card payments, auto purchase or student loan payment during this time,” says Michael Hammelburger, CEO of the Bottom Line Group, a cost reduction consulting company.

If you go this route, it’s important to assess how much you need and how much you can pay back on a monthly basis. “These two factors are crucial when getting a personal loan, because anything that’s beyond your financial need is just going to affect the interest rate that you need to pay back,” says Hammelburger.

5. Home Equity Line of Credit (HELOC)

If you have equity in your home, look into a home equity line of credit (HELOC) or home equity loan. These options use your home as collateral, so it’s important that you can manage the payments. Too many missed payments could result in the bank seizing your home.

Note that if you’re using the money to make improvements to your home, your interest payments may be tax-deductible. Rates are usually competitive among lenders, so check with two to three before choosing one.

6. Peer-to-Peer (P2P) Lending

Peer-to-peer lending websites connect borrowers with individuals or groups of individuals who are willing to loan you money. Interest rates vary, and the best platform for you will depend on your credit and the amount you want to borrow.

Peerform, for instance, offers rates as low as 5.99%, but loans are limited to $25,000. Rates on sites like LendingClub and Upstart are over 8% for their best-credit borrowers; LendingClub and Upstart offer loans up to $40,000 or $50,000, respectively.

7. Brokerage Margin Loan

If you have a margin account at an online brokerage, you can borrow money with the investments in the account as collateral. The brokerage will charge you interest, but there’s no set repayment schedule.

Keep in mind that if the value of the securities you’re using as collateral declines below a certain threshold, the brokerage may issue a margin call that requires you to deposit additional funds or sell some of your investments.

This can get risky as depending on your margin agreement, your brokerage may have no responsibility to give you that choice. It may simply sell some of your securities without notifying you to bring your account back into good standing, meaning you could end up selling investments at a loss.

8. Life Insurance

If you have a permanent life insurance policy with cash value, you may be able to borrow against it. A permanent life insurance policy is one that lasts your whole life as long as you pay the premiums. This is different from term life insurance, which only covers you for a specific period of time (or “term”) and has no built-up cash value.

Borrowing from your permanent policy requires that it has accrued enough cash value, which takes time. Call your insurer if you’re unclear whether this is an option for you. Bear in mind that borrowing will decrease the death benefit in the event that you die before you repay the loan, and you may face interest charges, although they’re typically low.

If you don’t already have permanent life insurance, don’t go out of your way to get it solely for use as an emergency fund. Premiums for permanent life policies are normally much higher than term life policies, and the extra money you’d pay each month may be better used growing a more liquid emergency fund.

9. Social Security

If you’ve already reached your full retirement age but haven’t started taking Social Security yet, you can take a lump-sum distribution of up to six months of payments at once. How much you can take depends on how far past your full retirement age you are. If you’re only four months past your full retirement age, for example, you can only request up to four months of lump sum benefits.

While the influx of cash might be helpful, it’s generally considered a bad idea long term. That’s because it decreases your monthly benefit to the amount it would have been had you started taking Social Security however many months before.

10. 401(k) Loans

This option strays in the direction of tapping your retirement funds, and you should really consider other options if you need cash now. Nevertheless, many 401(k) plans give you the option of taking out a loan from your own account balance.

A 401(k) loan allows you to borrow money from your balance without incurring the taxes and penalties you might face if you made a direct withdrawal. As with any loan, you’ll pay it back with interest—essentially you’re paying yourself to take a loan from yourself. 401(k) loans are usually limited to $50,000 or 50% of your vested account balance, though if you’ve faced financial hardship because of certain federally recognized disasters, you may be able to take a loan equal to $100,000 or 100% of your vested balance.

As noted in the introduction, taking money out of retirement funds can seriously impede your ability to retire on time, so proceed very cautiously. And in addition to missed gains, keep in mind, if you part ways with your current employer before you’d paid back your loan, you will have to pay it back no later than when your taxes for that year are due; your company may even require sooner, depending on its policies.

If you cannot afford to repay your loan in that amount of time, you’ll have to treat the outstanding balance as an early withdrawal and may owe taxes and a 10% penalty.