Gas flares and refinery odors are embedded in the proud histories of Marcus Hook and Trainer. But the towns' residents and money counters need not go very far to get an uneasy glimpse of the future.

It was two years ago that Sunoco stunned West Deptford Township, across the Delaware River in Gloucester County, by closing its refinery and eliminating 400 jobs.

The closing has left behind a quagmire of tax litigation and a town understandably nervous about its fiscal future. "We're waiting for shoes to drop," said Len Daws, West Deptford deputy mayor.

If anything, the pain could end up being more acute in Marcus Hook, site of an idled Sunoco plant, and Trainer, host of a ConocoPhillips refinery that also is to be sold or closed. The tiny boroughs are about to learn that the fallout from changes in the global economy can sift into classrooms and family budgets.

Sun is getting out of refining because gasoline demand is down, and refining at more efficient plants overseas is cheaper, said Philip Weiss, senior analyst at the Argus Research Group in New York.

The loss of jobs is a tragedy, but for the fiscal health of the towns and the Chichester School District, the closings could be devastating.

"This is big," said Brian Hoover, president of the Delaware County Consortium of Municipalities. "This has the ability to sink a couple of towns."

At the root of the looming crisis is the fact that towns and schools pay their bills primarily through property taxes.

As ultra-valuable parcels worth a combined $150 million by Delaware County's reckoning, the refineries yield $3.8 million for the Chichester School District, according to business administrator Janice Lion, and about $1.6 million for the towns annually.

Taking into account the 1 percent earned-income tax paid by close to 1,000 employees, the refineries account for as much as half of those towns' tax revenue.

But what is a refinery worth when it stops being a refinery?

As in West Deptford, that is likely to be a matter for the courts to decide. West Deptford, in fact, has been in a court battle with the previous owner of the refinery grounds since 1988. "You could be looking at a $30 [million] to $40 million settlement," Daws said.

Whatever the outcome of this or any appeal, however, the taxable value of an erstwhile refinery property almost certainly is going to be less than that of an operating refinery.

The ideal solution would be for other refiners to buy the properties. "This is not a facility that's going to be turned into a park," Daws said. "You're not going to build homes there."

So far, the West Deptford facility hasn't drawn much interest from potential buyers. Weiss, the industry analyst, says the trend has been for refineries to become port facilities, and that may happen along the Delaware.

In the meantime, the good news for the towns is that the property owners must continue to pay taxes while any appeals are pending.

In West Deptford, Sun still has a presence and maintains its tank farms.

"It certainly has had an effect," West Deptford administrator Eric Campo said of the closing, but "there is some hope for the future."

Contact staff writer Anthony R. Wood at 610-313-8210 or twood@phillynews.com.