When Rhonda and Byron Dunlap fell behind on their mortgage payments while they were both out of work, their biggest fear was losing their home.

"It was scary," said Rhonda Dunlap, of Royse City, Tex. "We couldn't live without a home. We have kids."

In the past, such a situation could have resulted in the Dunlaps losing their home. Fortunately, they ran into trouble in an era when many lenders will go to great lengths to avoid foreclosing on a home.

The Dunlaps contacted Consumer Credit Counseling Service of Greater Dallas, which helped them work out a payment plan with their lender.

If you anticipate having trouble paying your mortgage or are already in that predicament, contact your lender immediately. Don't wait until you're so far behind that it's too late to save your house.

In the Dunlaps' case, their lender agreed to what's called a "partial claim." Their loan is insured by the federal Housing and Urban Development Department, which paid their lender the amount necessary to bring their mortgage current.

HUD didn't charge the Dunlaps extra interest, but they do have to repay the government when they pay off their first mortgage or when they sell.

Lenders have several options to avoid foreclosure.

"Every major lender now has a specialized workout department for people to call when they get in trouble," said Craig Jarrell, president of the Dallas region of Pulaski Mortgage Co.

Whatever you do, don't fall for a "foreclosure rescue" scam. Scam artists promise to protect your home from foreclosure but end up ripping you off and leaving you in even worse financial shape.

"Anybody who picks you -- when they come at you and you haven't called them -- that's because they have a deal you really don't want to get involved in," said Elizabeth Renuart, an attorney for the National Consumer Law Center in Boston.

Homeowners having trouble keeping up with their mortgage payments have to make some tough choices.

"Once you get behind, it just compounds real quick," said Reid Remington, housing counselor at Consumer Credit Counseling Service of North Central Texas in McKinney. "After the second payment is late, if you don't send in the full amount, then they'll stop accepting any payments, and that's when they just seem to spiral downhill real quick."

Make paying your mortgage your top priority, even if it means letting other debts go late for the time being. A family's first need is shelter.

"When they look at all of their bills, they really have to prioritize in order of importance," Remington said. "Not that credit cards aren't important to pay, but they can't take priority over a home or an auto payment."

The car, he said, is almost as important as a house -- because you need transportation to get to work or to search for a job.

Some consumers don't see the many places they can cut non-essential expenses. But credit counselors take a tough attitude.

"They're still going out to eat lunch and dinner or they have a $150 cell phone," said Beverly O'Pry, a counselor at the Mesquite office of Consumer Credit Counseling Service of Greater Dallas. "Is my cable more important or is it my house? If you don't have a house, you don't need cable."

O'Pry helped the Dunlaps, who have two teenage children, when they fell four months behind on their mortgage.

Byron Dunlap left his construction job and was out of work from December to April, and Rhonda left her job in June because of illness.

"Due to loss of income and illness in our family, we became delinquent on our mortgage payments," Rhonda Dunlap said. "We did not know what we were going to do. We kept receiving letters of foreclosure advising us we would have to sell our home."

O'Pry helped the couple develop a budget to present to their mortgage company and also talked to the firm.

The Dunlaps cut out their cable TV service.

"We have to cut back on our bills," Rhonda Dunlap said. "We don't do a whole lot. We got to keep our Internet, so we had some form of entertainment. We just accumulated too many bills."

Giving yourself extra money is important because some mortgage companies require you to have a cash cushion before working with you to resolve late house payments, O'Pry said.

"Some mortgage companies won't work with you if you don't have a cash cushion, because they want to make sure that the client can afford this mortgage," she said. "If it looks like it's so tight that they can't afford it, they'll go ahead and foreclose."

Absent the tweaks you can make to your personal lifestyle, mortgage companies have several ways they can work with you to get you current on your payments.

"Nobody wants a foreclosure," said Jarrell of Pulaski Mortgage. "How fast can you bring it current? Can you pay partial payments? Do we need to move the payments to the back of the loan?"

That's a big change in the mindset of lenders.

"In the old days -- even 10 years ago -- the institutional mindset was, it's a massive group of numbers, it's just a bunch of loans, it's a bunch of dollars, let's just deal with it, get rid of it as quickly as we can, just charge it off and be done with it," Jarrell said.

"As foreclosures and delinquencies have risen across the board, lenders finally figured out that, gosh, maybe if we did more to educate the customer and intervene early with the customer -- pre-foreclosure counseling, intervention and management -- then we might reduce the number of foreclosures before it gets to that point."

But it's a two-way street.

"Borrowers have long hid from us," Jarrell said. "The customers need to reach out to the lenders by calling us early and calling us often."

Homeowners whose mortgages are backed by HUD and the Federal Housing Administration may contact a HUD-approved counseling agency for help.

Homeowners who have conventional loans should contact their lenders.

There is a group of people who'd prefer you not contact your lender -- scam artists.

They find victims by looking in the newspaper for foreclosure sales.

"They know how to find you," said Renuart of the National Consumer Law Center, who co-wrote a recent report on foreclosure rescue scams. "When the foreclosure scam artists come in, typically they tell the homeowner not to pay the mortgage company. They will handle it for them."

That's the worst thing you can do.

"Don't panic, don't sign any contracts under pressure," Renuart advises. "Don't pay your mortgage payments to anybody other than your lender. If they say, 'We're going to pass it on,' forget it. It's gone."

The most prevalent scheme among scam artists is what's called "equity skimming." A "buyer" approaches you, offering to bail you out of financial trouble by promising to pay off your mortgage or give you an amount of money when the property is sold. These foreclosure rescue scams come in three types.

* Phantom help. The "rescuer" charges outrageous fees either for phone calls and paperwork the homeowner could have easily performed, or on a promise of better representation that never occurs. "In either event, the homeowner is usually left without enough assistance to actually save the home but with little or no time left to prevent this grievous loss by the time she or he realizes it," according to a recent report by the National Consumer Law Center in Boston.

* Bailout. This scenario includes various schemes under which a homeowner surrenders title to the house, believing that he or she will be able to rent the home and buy it back in the next few years.

Scam artists sometimes tell the homeowner that giving up the title is necessary so that someone with a better credit rating can get new financing to prevent foreclosure. However, the terms of those deals are so onerous that a buyback becomes impossible.

* Bait-and-switch. This is where a homeowner doesn't realize that he or she is surrendering ownership of the home.

"Many homeowners later insist that they believed they were only signing documents for a new loan to make the mortgage current," according to the Consumer Law Center report. "Many also say they had made it quite clear they had no intention of selling or giving up their home to anyone."