When Marianne and Matthew Schottenfeld began thinking of selling their home in Waldwick, N.J., in early 2009, a real estate agent advised them to remove the underground heating-oil tank.

"We thought it was going to be pretty painless and inexpensive," Matthew Schottenfeld said. "But the contractor discovered that the tank was corroded and oil had leaked into the ground. It was downhill from there."

The Schottenfelds' Bergen County property is completely clean now, but getting it that way took more than $60,000 and 21/2 years. Although theirs was an extreme case, it illustrates the trouble such hidden tanks can create for homeowners, buyers, and sellers.

There are an estimated 120,000 buried residential oil tanks in the state, according to the New Jersey Fuel Merchants Association. That number has been shrinking as homeowners remove the tanks, either by replacing them with above-ground tanks or switching to natural-gas heat.

In many cases, a home sale forces the issue. Because of the tanks' potential for pollution, most buyers demand removal before the deal can go through.

"I haven't had a buyer in years who accepts a house with a tank in the ground," said Sheldon Neal, a Re/Max agent in Oradell, Bergen County.

Mortgage lenders and homeowners' insurance companies also are wary of underground tanks. As a result, many real estate agents advise sellers to deal with the tanks before they even put their houses on the market.

Sellers don't always know whether there are oil tanks on their properties because previous owners may have abandoned the tanks years earlier. If there's a question, home inspectors often look for such signs as old pipes or oil-feed lines in the house.

In the Philadelphia area, both in Pennsylvania and South Jersey, most oil tanks are above-ground and "nowhere near the concern" they are in North Jersey, said Roy Patterson, executive vice president of the Delaware Valley Fuel Dealers Association in Richboro, Bucks County, whose website offers information about residential storage tanks (http://is.gd/S28YEq).

"I have never seen it hold up a home sale," Patterson said Thursday. "The worst thing I've seen is that a buyer might ask that a tank be tested."

Homeowners should check with their fuel suppliers about individual tank-insurance policies and look into installation guidelines established by their state's Department of Environmental Protection, Patterson said.

"The only tanks that might be in question are probably very old, at least 30 years. Only 1 or 2 percent of tanks end up leaking over their lifetime," he said. "When I was more involved in the actual industry, we pulled out 50-year-old tanks that were as good as the day they were installed."

To search out an old tank, an inspector will typically sweep a property with a metal detector and do test borings of the soil nearby to see whether there are any leaks.

If a tank is found, removing it typically costs $1,500 to $2,000. But if it has leaked oil, cleanup costs can run into tens of thousands.

That's what happened to the Schottenfelds, whose tank leaked oil into their neighbor's property as well as their own. Tests found that the leaks probably started 25 to 30 years ago.

Joe Solari, vice president of Aim Tank Services in Passaic County, N.J., said that in his experience, about 60 percent of removed tanks are leaky.

Insurance won't necessarily take care of the cost of cleanup. Insurance companies try to limit their exposure to tanks. USAA, for example, won't write a new homeowners' policy for any property that has an underground tank, although it continues to renew policies on such properties.

Heating-oil companies that offer insurance typically cover up to $100,000 in cleanup costs on the homeowner's property. That insurance may carry restrictions, however, including the requirement that if an underground tank is removed, the homeowner installs another tank and sticks with oil heat for at least a year.

Jenni and Paul Harmon, who recently bought a Cape Cod in Waldwick, accepted an underground oil tank only because there was a $100,000 policy provided through the oil dealer.

"It definitely gave us some peace of mind," Paul Harmon said. The couple, nonetheless, plan to remove the tank within a few years.

In the past, some homeowners dealt with underground tanks by having them cut open, drained of oil, and filled with sand or foam - a process called decommissioning or abandoning in place.

These days, the New Jersey Department of Environmental Protection strongly advises that tanks be removed rather than abandoned.

"When you don't remove them from the ground, it's pretty hard to determine if there's a hole in there," said Gary Sanderson, coordinator of the agency's residential-tank program.