Struggling homeowners across the country could face significant new tax bills if they receive mortgage relief from their banks, a prospect that threatens to slow the housing recovery and put further strain on distressed borrowers.

The collapse of the housing market and plunging home prices left millions of people stuck owing more on their mortgages than their homes were worth. Some have worked with their banks to reduce the loan amount to avoid foreclosure or enable a sale.

In 2007, Congress adopted a law that spared those homeowners from being taxed on the amount of the loan that was forgiven.

But that tax break expired in December, and now the forgiven debt can be counted as income by the IRS. Housing advocates worry that the lapse could scare homeowners away from making a deal with their bank, which could disrupt efforts to reduce foreclosures and harm borrowers who were just getting back on their feet.

Stella Thompson said she is looking at a $30,000 tax bill on her Seattle area home.

After Thompson and her husband separated a few years ago, they fell behind on their mortgage payments. This month, with their lender’s approval, they sold their house for $85,000 less than they owe on the loan. Had the tax break been in place, they would not owe taxes on the forgiven debt. Now, they might.

That’s a real hardship,” said Thompson, 55, who moved out of the house in 2011 and rents a duplex. “I live paycheck-to­paycheck and barely get by financially.”

A recent analysis by the Urban Institute found that about 2 million homeowners will be at risk of incurring that kind of tax liability. A congressional analysis estimates that borrowers will be on the hook for $5.4 billion in extra taxes if Congress fails to renew the tax break, known as the Mortgage Forgiveness Debt Relief Act.

At issue are millions of underwater borrowers who are unable to refinance or sell their way out of trouble unless they strike a deal with their lenders, such as a reduction in the amount owed on the loan or the approval of a “short sale,” such as Thompson’s.

For years, the Obama administration has encouraged such solutions, recognizing that they are a cornerstone in the housing sector’s recovery. Congress did its part in 2007 when it created the tax break, and lawmakers have renewed it twice.

Despite the tax break’s broad popularity, it is unclear whether Congress will renew it again. This month, the Senate Finance Committee voted to revive the break for the 2014 and 2015 tax years. But the provision is part of a larger package of expired breaks that is ensnared in a partisan dispute over comprehensive tax reform, and it could be derailed on the Senate floor or in the Republican-controlled House.

If history holds, Congress is unlikely to settle the matter until after the midterm elections in November, leaving troubled homeowners in limbo.

With the tax break off the table for now, struggling homeowners say they are wary of entering into arrangements that expose them to hefty tax bills.

Nancy Ryan, a bankruptcy attorney in Fairfax, Va., said one of her clients is preparing to file for bankruptcy to avoid the tax hit. The client bought a condominium in Centreville, Va., for $250,000 eight years ago. He recently lost his job, stopped paying his mortgage and received approval to sell his home for $94,000 less than he owes on it, Ryan said.

If he goes through with a sale now, he would be liable for about $25,000 in taxes next April, Ryan said. But if he files for bankruptcy protection, he could be off the hook, because people who are in bankruptcy or insolvent are usually shielded from the extra taxes.

“We’re waiting to see what Congress will do,” Ryan said. “If they don’t renew the tax break, he’ll file for bankruptcy protection and then go through with the short sale.”

If the short-sale option falls through, he will most likely lose his home to foreclosure, Ryan said. But his financial troubles won’t end there.

Under Virginia law, his lender can go after him for the difference between what his home brings in foreclosure and the amount he still owes on his mortgage. And if the bank does not go after him for that amount, the IRS will tax it.

The expiration of the tax break presents broader policy implications as well. After being coaxed — and even forced — by the government to work with troubled borrowers, lenders may suddenly find that borrowers are in no position to accept their help.

JPMorgan Chase has set aside nearly $2 billion for consumer relief as part of a $13 billion deal it reached with the government in November. Mortgage servicer Ocwen Financial agreed in December to earmark $2 billion for loans as part of another settlement with the government, which accused the firm of engaging in improper mortgage servicing practices.

There is also an issue of fairness to consider, said Diane Thompson, an attorney at the National Consumer Law Center. Without the tax break, borrowers who receive help would get slammed with extra taxes, while lenders who dole out the help can deduct the expense as a tax write-off.

“There’s something inherently unfair about that,” she said — especially since the tax hit could offset the benefit the borrower receives.

Three-quarters of a million people took advantage of the tax break from 2008 through 2011, the most recent IRS figures show. Housing experts say those figures might be low. In the two years since then, 738,000 homes have undergone short sales, which is only one of the ways borrowers can get out from under their mortgages, said Sam Khater, deputy chief economist at the mortgage research firm CoreLogic.

But once the tax break expired, borrowers seemed to retrench.

In its polling of real estate agents nationwide, Campbell Surveys found that the number of short sales declined after the tax break expired, suggesting that homeowners are less enthusiastic about these arrangements now that they face a potential tax liability, said Thomas Popik, the firm’s research director.

Short sales made up about 7 percent of all home sales in the last three months of 2013, but the proportion of short sales fell by a noticeable 14 percent in the first quarter of this year, he said.

Homeowner Darrell Pena took the plunge, but he is second-guessing the decision.

After Pena lost his job in 2008, he rented his Connecticut home to a young couple and took a job in Texas. But the renters left last year. Unable to find new tenants, he opted for a short sale because he owes more than the house is worth.

Pena said he has a potential buyer and expects the deal to close next week.

“But now we’re told we could get a tax bill for $30,000,” Pena said. “Looking back, the easiest thing would have been to let our house go into foreclosure !!!