Despite recent bankruptcy filings by Alabama's Jefferson County and Pennsylvania's Harrisburg, heading to court for debt relief is expected to remain a last resort for financially stressed local governments.

Only 26 states allow local governments to file for bankruptcy -- and states are not allowed to file at all. A number of states step in when counties, cities, or towns teeter toward bankruptcy and this trend is seen accelerating.

But localities hoping a bankruptcy puts them in a better bargaining position than a state-led takeover will have to reckon with detrimental effects for all parties.

Chapter 9 is a last resort after all else fails, said Louis Schimmel, the state-appointed emergency financial manager for Pontiac, Michigan. He said bankruptcy not only ruins a government's credit rating, but it could also impair those of neighboring communities and even the state's.

There are more troubled municipalities out there. In Michigan, the city of Flint was declared to be in a financial emergency this week and could join Pontiac and two other cities in having an emergency manager. Detroit's mayor has warned his city may be headed toward a state takeover, while a state-appointed manager already controls Detroit's school system.

Ohio has 32 local governments under fiscal emergency, according to the state auditor's office.

Jefferson County and Harrisburg may set some important precedents in an area of bankruptcy law that so far has had few.

BANKRUPTCY COULD TAINT CREDIT

Jefferson County and Harrisburg along with Central Falls, Rhode Island, and Boise County, Idaho, have all headed to bankruptcy court this year, although the Idaho case was rejected by a judge. Jefferson's is the biggest municipal bankruptcy in U.S. history.

The question of bankruptcy and the attractiveness of bankruptcy may very well be determined by what happens in Harrisburg and Jefferson County, said Richard Ciccarone, a managing director and chief research officer at McDonnell Investment Management.

Governments are stigmatized in the $3.7 trillion municipal bond market if they file for bankruptcy, making it difficult to borrow money, while bankruptcy judges under Chapter 9 have limited power to deal with problems, said William Brandt Jr., president and CEO of Development Specialists Inc.

A judge is really a facilitator here, waiting for a plan that is acceptable, said Brandt, whose firm provides turnaround assistance for troubled enterprises.

Schimmel, who took over Pontiac after the previous manager, an advocate for bankruptcy, left, said he believes the city's problems are fixable, particularly with expanded powers Michigan recently gave managers, including the ability to void labor contracts.

Bankruptcy works better if you're a corporation and just go out of business. (Municipalities) can't go out of business or pick up and move to China where things are cheaper, Schimmel said.

In the case of Pontiac, Schimmel recently warned residents that their taxes may go up to make annual payments to pension and health care funds and to refund property taxes to General Motors, while sewer fees may also rise.

John Young, the court-appointed receiver for Jefferson County's sewer system, said double-digit increases are planned for county residents, where an earlier agreement would have called rate increases at 6.5 percent.

Steven Frates, a state and local government specialist and research director at the Davenport Institute at Pepperdine University's School of Public Policy, expects financial strain will press more cities and counties to mull bankruptcy if their states allow them the option.

In states that do not allow municipal bankruptcy, troubled local governments will fall under the supervision of state officials. But that has its own risks, Frates said: Who knows if the state is any better at handling the problem?

KEEPING GOVERNMENTS OUT OF COURT

Pennsylvania specifically devised a law to ward off bankruptcy filings by requiring municipalities to devise long-term plans to rescue their finances under state oversight. Harrisburg is fighting this with its bankruptcy filing.

Some 20 Pennsylvania cities, townships and boroughs now are under Act 47 -- and some, often former steel towns, have found it hard to exit.

The city of Farrell in the northwestern part of the state has been in the program since November 12, 1987, according to Steve Kratz, a spokesman for the Pennsylvania Department of Community and Economic Development.

In New York, Nassau County, one of the nation's wealthiest, is on its second turn of having its finances overseen by a state authority.

The county, Long Island's eastern half, recently lost a court fight to block the overseer from forcing it to put its fiscal house in order after years of mismanagement.

EVENTS DRIVE DOWNFALLS

Data from the law firm Chapman and Cutler indicates municipal utilities and special districts accounted for the majority of the 242 municipal bankruptcies filed from 1980 through the end of June 2011.

Recent municipal bankruptcies were driven by events. Jefferson County's move was triggered by debt amassed for its sewer system, Harrisburg's problem centers around its incinerator debt and Boise County was on the losing end of land-use lawsuit.

In order for Jefferson County to trigger anything, you would have to have a fair number of municipalities sharing this very distressed credit profile and the fact is you don't, said Joseph Pangallozzi, director and credit research analyst at investment firm BlackRock.

(Reporting by Karen Pierog. Additional reporting by Jim Christie in San Francisco, Lisa Lambert in Washington and Joan Gralla in New York)