Marty from Spokane, Washington, thought he was taking a smart step toward debt-free homeownership. But pulling $400,000 from his 401(k) to buy a house left him with a staggering $140,000 tax bill.

“I just recently found out that when I go to file my taxes, I am going to owe roughly $140,000,” he said, calling into The Ramsey Show. “I really don’t want to do a payment plan with the IRS, but I just don’t know the best path forward.”

Marty thought he had paid all the fees and taxes when he withdrew the money, but said, “I was misinformed that it had been paid… and I didn’t realize it hadn’t been done until I went to file my taxes.”

The Ramsey Show says it’s better to owe a bank than the IRS

Marty has a few ways to come up with the money: He could use a line of credit like a HELOC or credit card, dip into his $60,000 in savings, or take out a personal loan from a bank. But The Ramsey Show co-hosts Jade Warshaw and Rachel Cruze were clear: some of those options could make things worse. They advised against using a home equity line of credit (HELOC) or a credit card.

“I would not do a HELOC,” Cruze said. “I would not put your home at risk. With HELOCs, the interest rates are sometimes insane.” As for credit cards, the interest rates tend to be even higher and more volatile, and the debt can spiral fast. That’s a dangerous mix when dealing with a large IRS bill. Instead, Warshaw and Cruze recommended pulling from Marty’s savings and using a personal loan from a bank to cover the remainder.

“Use your savings, then get a personal loan to pay the IRS off as quickly as possible,” Warshaw advised.

“Because I’d rather owe a bank than the IRS at this point,” Cruze added.

IRS debt can lead to aggressive penalties, interest and long wait times when trying to resolve issues — which is why they emphasized handling it quickly, cleanly, and without risking other key assets like retirement accounts or home equity.

“You’re already in the hole,” Cruze said, adding “…be in the hole with a bank.”

The consequences of tapping into your 401(k) early

Marty’s story serves as a reminder to avoid dipping into retirement accounts, especially if you don’t fully understand the tax implications.

As Warshaw concluded, “No more leveraging very important things for debt.”

Don’t miss

In a financial emergency, your 401(k) might look like a tempting source of fast cash, especially when you see a hefty six-figure balance just sitting there. But taking money out of your 401(k) before age 59½ can come with serious consequences that extend far beyond the immediate tax year. You’re typically hit with a 10% early withdrawal penalty and ordinary income tax on the total amount that you’ve withdrawn.

For example, let’s say you withdraw $20,000 from your 401(k) before age 59½:

Aside from the fees and taxes, there are long-term implications, too.

Lost investment growth: Money withdrawn from your 401(k) isn’t just taxed, it’s no longer growing. A $20,000 withdrawal today could have grown to $80,000 or more over 25 years with compounding returns (assuming an average of 7% annual growth).

Tax time shock: Many people think taxes and penalties are deducted automatically. But if you don’t withhold the right amount when you take the distribution, you may owe thousands when you file, with penalties and interest if you can’t pay on time.

When a 401(k) withdrawal might make sense

There are some exceptions where tapping into your 401(k) early may be the only option:

Before dipping into your retirement funds, consider other options:

Pulling from your 401(k) early can feel like a quick fix, but with taxes, penalties and lost future growth, you could lose 30% to 40% of what you take out, so it should be treated as a last resort rather than an easy solution.

Read more: Want an extra $1,300,000 when you retire? Dave Ramsey says this 7-step plan ‘works every single time’ to kill debt, get rich in America — and that ‘anyone’ can do it

This article provides information only and should not be construed as advice. It is provided without warranty of any kind.