After the bank foreclosed on Fernando Palacios's Gainesville home in March, he thought he was done with what he described as the most stressful financial situation of his life.

The bank sold the home for far less than Palacios owed on it, as often happens with foreclosures. What Palacios did not see coming was the letter from his lender demanding that he pay the shortfall: $148,064.02. "I really thought I was through with this house," said Palacios, who fell behind on payments when the economy soured and his cleaning business stumbled.

Over the past year, lenders have become much more aggressive in trying to recoup money lost in foreclosures and other distressed sales, creating more grief for people who thought their real estate headaches were far behind.

In many localities -- including Virginia, Maryland and the District -- lenders have the right to pursue borrowers whose homes have sold at a loss to collect the difference between what the property sold for and what the borrower owed on it, also called a deficiency.

Before the housing bust, when the volume of foreclosures was relatively low, lenders seldom bothered to chase after deficiencies because borrowers had few remaining assets to claim and doing so involved hassles and costs. But with foreclosures soaring, lenders are more determined to get their money back, especially if they suspect borrowers are skipping out on loan they could afford, an increasingly common practice in areas where home values have tanked.

Palacios said he was committed to staying in his house, which he bought in 2005. He sunk $20,000 into improving it and hoped to raise his children there. But his lender refused to modify his loan, he said. To avoid personal liability for the deficiency, Palacios is filing for bankruptcy protection, as many people do who are in similar situations, said Nancy Ryan, his bankruptcy attorney.

"I am definitely seeing more people come through my door who walked away from houses a year or two ago and thought they were as free as the dead," Ryan said. "They're stunned when they realize they're not."

Several lenders contacted for this story declined to say how often they pursue deficiencies. But many said they try to collect the debt if they conclude the borrower can repay all or part of it.

"Lenders are not going after people who face a hardship," said John Mechem, a spokesman for the Mortgage Bankers Association. "If they can't pay their mortgage because they have a loss of income, there is no point in going after them."

Those who had a second mortgage, such as a home-equity line of credit, in addition to their primary mortgage may find themselves particularly vulnerable, especially if they tapped into the equity line for cash.

Second lenders are last in line to get paid when a distressed property is sold. There's usually little or no money left over for them, making it more likely that they will pursue large deficiencies, several attorneys said.

Gretchen Somers said she and her husband understood the risks last year when they completed a "short sale," a transaction that allowed them to sell their Manassas home for about $150,000 less than they owed on it. But they felt they had no other options.

Somers said her family hung onto the house as long as possible. They tried but failed to sell it when her husband was transferred to Arizona for his job in early 2006, just as home prices were softening. They moved back into the house then tried to sell it again in 2008, after their adjustable-rate mortgage reset and their monthly mortgage payment nearly doubled. But home prices had plunged further by then, making it even tougher to sell.

Last year, their first lender and their home-equity line lender granted permission for the short sale. But the second lender reserved the right to come after the couple. Six months later, a collection agency called demanding $85,000 for related losses.

In hindsight, Somers said she and her husband should have just walked away from the house. "We took care of the house because we wanted it to sell," Somers said. "If they were going to come after us anyway, we shouldn't have done them the favor of making sure it looked good and cutting the grass even after we moved out, We should have mailed them the key and said: 'Here you go.' "

Carlos Cortez and his wife managed to escape that fate after their second lender came after them for $70,000 when their short sale was completed on his Manassas Park townhouse in 2008.

Cortez knew that was a possibility, but he went through with the sale because his real estate agent said the lender was engaging in scare tactics.

James Scruggs, an attorney at Legal Services of Northern Virginia, said the lender appears to have backed off after Cortez argued that that the loan officer falsely qualified him and his wife for a home-equity line by fabricating key details about their finances.

A handful of states do not allow lenders to pursue deficiencies, nor does a federal program that took effect April 10. Lenders participating in that initiative are paid for approving short sales and as a condition, they cannot go after outstanding debt.

In many states, lenders can go after deficiencies, though laws vary widely, said John Rao, an attorney at the National Consumer Law Center. Some states limit how long the banks have to file a claim or collect the debt. Others may calculate deficiencies based on the fair-market value of the house, Rao said. For instance, if a home sells for $200,000 yet its fair market value is $250,000, "the borrower who owes $240,000 on the mortgage would not have a deficiency," he said.

Borrowers should get a waiver in writing from their lenders to protect themselves, said Diane Cipollone, an attorney at the nonprofit Civil Justice. "Nobody should assume the deficiency is forgiven," she said.