Image: Home Foreclosure © Dana Hoff, Getty Images

Michael Barton was just 19 when he bought his first foreclosure four years ago for $37,000. The Lincoln, Neb., resident said he realized he could pay less on a mortgage than he was spending to rent a six-bedroom house with his brother and three other people.

"I was paying $350 a month in rent and knew there were houses out there that would have a mortgage lower than that," Barton said. "My original mortgage on my first house was $315 a month, and I had my brother living with me paying $350 a month, (so I was) living for free."

Since then, Barton has purchased three more foreclosed properties to fix up and rent out.

By contrast, financial planner Diahann Lassus wasn't in the market for an investment property when she noticed a foreclosure for sale around the corner from her Bonita Springs, Fla., home.

After extensive research and number crunching, Lassus offered the bank 20% less than its asking price -- a discount that reflected the considerable costs necessary to fix up a house that had been empty for two years. Her offer was accepted, so she wound up paying $95,000 cash for a three-bedroom house once valued at $350,000.

The renovations cost more than she had expected -- about $45,000 -- and the return on her investment has been less than what she's making on her stock market investments. But she has "great renters" who are covering her costs, and she expects the home to appreciate over the 10 years or so she plans to own it.

Buying a foreclosure can be a great way to get a home for less, whether you're planning to live in the property or rent it out. The supply of foreclosures certainly isn't going to dry up soon, which means plenty of opportunities for home seekers and investors.

Plenty of pitfalls await the unprepared buyer, however.

Liz Weston

Liz Weston

"A foreclosure is not for everyone," said John Anderson, a longtime agent with Twin Oaks Realty in Golden Valley, Minn., who says about half of his business is short sales and foreclosures. "A lot of buyers are struggling just to get enough money" for a down payment and "don't have $4,000 to replace the carpet and $1,000 to repaint and $2,000 for new appliances."

Even for those who have some spare cash, it might not be enough to buy troubled properties that are too run-down to qualify for Federal Housing Administration or even conventional mortgages. Peeling lead paint can be enough to thwart an FHA loan, while more serious problems, like a roof that needs to be replaced, can stymie a conventional loan. In such cases, only buyers who can pay cash are considered.

"The buyer has to qualify for financing, but the property has to qualify, too," Anderson said. "The seller is not going to let you in to fix the property (before the deal closes), and the new bank won't let you close until the work is done."

Some properties simply need too much work to make much financial sense. A foreclosure might be $15,000 less than a comparable property, for example, but may need $30,000 in repairs and improvements to make it habitable. In such a case, the more expensive property "is a better investment, because the work is already done for you," Anderson said.

"Just because the price is low doesn't mean it's a good deal," he said.

Here are some other things to keep in mind when you consider buying a foreclosure:

Planning to flip? You might want to rethink that.

People can, and do, buy foreclosed houses cheap so they can fix them up for quick resale. In falling markets, though, it can be hard for buyers, particularly amateurs, to do this successfully. If you don't get a steep enough discount or spend too much on repairs or don't find a buyer quickly, what looked like a great deal can become a cash drain. Many investors now are focusing on properties they can rent out for several years, so they can benefit from price appreciation when it eventually returns. Lassus recommends that foreclosure buyers be ready to hang on to a property for seven to 10 years.

Don't expect to automatically get a screaming deal. Some banks slash a property's price for a quick sale, which means you'll get the house for less than comparable homes in the area. Other banks don't offer much, if any, discount, and intense investor interest in a property can lead to a bidding war that drives up the price.

Pay for a thorough inspection before you buy. Foreclosures are sold "as is," which means the bank won't make repairs or improvements. Even if the house's previous occupant didn't trash the place in a fury, the home may have hidden defects that could cost tens of thousands of dollars to repair. A bad foundation, extensive water damage or bad siding or drywall could turn a seemingly good deal into a nightmare.

"Get a registered property inspector to do a full inspection," including a termite inspection, Barton advised, "and be willing to take a loss of $300 to $500 (the typical inspection cost) if the inspection turns up something major."

Anderson agrees. He also gets a promise from the seller to get any utilities turned on in time for the inspection, since in many foreclosures they have been shut off.

"It's pretty tough to do an inspection if the utilities aren't on," Anderson said. "You want to make sure everything is functioning so you can get a full inspection."

Get bids for repairs and improvements before you make an offer. Even if you'll be doing most of the fix-ups yourself, you may still need pros for certain jobs. Having ballpark figures for repairs will help you know when you're getting a good deal, or when you might be overpaying. You'll also want to budget for surprises. Lassus had to scour the country to find the discontinued tile the previous homeowner had used in a half-finished job.

Research the homeowners association. Lassus knew the homeowners association was financially sound, since she already owned a property there. She would have been far more wary if there were a lot of other foreclosures, houses for sale, empty houses and strapped homeowners. A dwindling number of dues-paying residents means the association may have to jack up the fees it charges the remaining homeowners to cover its costs.

"Some associations don't allow 'for sale' signs," so it can be hard to know on casual inspection how many homeowners are in trouble, Lassus said. Real-estate sites such as Zillow can help, as can talks with local real-estate agents.

Know the rental market. If you plan to become a landlord, you want to make sure the rent you can charge covers all of your expenses, including property taxes, insurance, repairs, maintenance, homeowners association fees and assessments, and mortgage payments. Zillow offers rent estimates for many properties, but check with local real-estate agents to make sure those are accurate.

Also, a rental market may be hot right now, but it could cool off, leading to higher vacancies and lower rents, as many renters become homebuyers, Lassus warned.

Barton said he has benefited from the fact that Lincoln is home to several colleges. A steady supply of renters means "we get extremely good rental rates," he said.

Be patient. Lassus' deal was done within weeks because she paid cash and because the lender was on the ball. Other buyers of foreclosures warn that the buying process can take months and be chaotic.

"I would say my absolute worst experience thus far is going through the closing process of foreclosed houses," Barton said. "If you are dealing with HUD or Fannie Mae, they seem unorganized, probably due to the fact that they have thousands of these they are processing."

Barton says he's learned it's essential to work directly with the seller's title insurance company if he wants the deal to close on time.

Have a fat emergency fund. Lassus recommends every investor have an emergency fund to cover at least six months' worth of property expenses -- and preferably 12 months' worth. Unexpected repairs and vacancies can play havoc with cash flow, so you want a fat cushion.

Click here to become a fan of MSN Money on Facebook

After all, the last thing you want is to lose the property and become yet another casualty in the foreclosure epidemic.

Liz Weston is the Web's most-read personal-finance writer. She is the author of several books, most recently "The 10 Commandments of Money: Survive and Thrive in the New Economy" (find it on Bing). Weston's award-winning columns appear every Monday and Thursday, exclusively on MSN Money. Join the conversation and send in your financial questions on Liz Weston's Facebook fan page.