Belatedly - and in the nick of time - state and local governments are starting to defuse the time bomb of widespread underfunded public-worker pensions.

The process is not going to be easy - or cheap. There are decades of neglect, of expedient political deals, of poor pension-fund management and unconscionable concessions to privileged classes of government workers to be paid off.

Massachusetts' solution, for instance, is a 40-year plan that will require - after a five-year phase-in to soften the fiscal blow - expending 26 per cent of state and local payrolls each year to cover the Bay State's huge $12.6-billion unfunded pension liability.

Officials of Boston and other hardpressed localities worry whether they can afford the annual payments. But Carmen W. Elio, chairman of Massachusetts' Retirement Law Commission and chief architect of the reform plan, warns that if the pension plans aren't put on a sound basis, bankruptcy will be inevitable.

The pension commitments many states and cities have made to their workers, especially when an employee can retire with more money than he was making on the job, amount to "capital punishment of the taxpayer," says Tennessee State Rep. John Bragg, chairman of the public-pension task force of the National Conference of State Legislatures.

Bragg reports that in 16 states a school teacher who retires at 65 after 25 years' service will receive - combining pension and Social Security - an actual increase in after-tax disposable income.

A Philadelphia city worker who retires at 65 after 30 years on the job will draw 129 per cent of his final takehome pay through combination of his city pension and Social Security, pension expert Bernard Jump determined. In Detroit the comparable figure is 116 per cent; in New York City 127 per cent.

There are some states and localities where employees are offered far less. But on the average, according to a Twentieth Century Fund report, pensions for state and local government workers are roughly double those the worker in private industry can expect. Many state and local government retirees are protected by automatic cost-of-living adjustments, for instance - features virtually non-existent in private industry pensions.

Sloppy acturaial work and fund management by political cronies have compounded the problem. The net result is that unfunded pension liabilities - obligations beyond accured retirement funds - are at alarming levels from coast to coast. Examples: California, $13.6 billion; Illionis, $5.7 billion; New Jersey, $5.3 billion; Ohio, $3.5 billion; Florida, $2.8 billion; Maryland, $2.5 billion.

Eventually, taxpayers are going to have to pay all those bills - plus the cost of the federal government's Civil Service and military benefits, an unfunded liability estimated as high as $700 billion.

Massachusetts' breakthrough came after Elio's Retirement Law Commission created a computerized data bank of the state's 101 state and local pension systems. The data bank, the first of its kind anywhere, can determine the cost of any proposed retirement-benefit change on short notice. A fiscal note is attached to any pension bill the legislature considers. One result: no pension liberalization since 1973.

"In the past," Elio says, "everyone used to say, 'Yes, pass a pension benefit today and worry about the cost tomorrow.' But tomorrow is today now, the costs are here, and they just can't keep being passed on."

Before the legislature accepted the new 40-year funding plan, Elio campaigned across Massachusetts for a year, persuading taxpayers and public employees that, without reform, the state's fiscal position would be dangerously weakened, with government workers in jeopardy of losing their pension benefits. Government-employee unions, previously hostile, dropped their opposition.

Massachusetts' data bank will now be expanded across New England under a grant from the U.S. Labor Department, permitting instant comparison of all six states' public-pension plans and effects of proposed changes.

At least half the states have started comprehensive pension reviews, moved to set up consolidated statewide retirement systems or begun, for the first time, to apply actuarial studies to proposed pension changes. Governors have started to veto pension "sweeteners" approved by state legislatures.

Delaware's legislature voted to limit new employees' total retirement benefits (including Social Security) to 75 per cent of final pay. New York began a reduced benefit plan for all new state and local government workers, which ties in Social Security benefits and is expected eventually to reduce pension costs by some 20 per cent.

Reduced benefits generally apply only to new employees, not workers already covered, on the legal theory - enforced vigorously by courts - that pension concessions once made are contracts a government can't break. But the Tennessee Supreme Court last year said that, if paying full pensions ever threatened the state's fiscal stability, the state might renege on its commitments.

With the pension debts states and localities must pay off in the next quarter century - in some cases exceeding active payrolls - there's a distinct chance of default in paying pensioners unless early reforms are made.

There have already been sufficient state reforms, however, to take the wind out of the sails of a congressional effort to impose on state and local pension systems many of the reporting, disclosure and fiduciary requirements already applicable to private-sector pension plans.

The House Pension Task Force last year issued a blistering critique of state and local plans, saying they lacked many of the basic safeguards required of private plans, often failed to inform participants of plan operations or the benefits they could expect, and in some cases were so poorly managed they "fairly reeked of culpability." State pension reformers smell gross hypocrisy in the idea of Washington applying private-sector standards to state and local governments while neglecting its own grossly overcommitted pension programs. It would be a classic case, says Elio, of "Don't do as I do; do as I say."

The best approach, Elio suggests, is to expand data banks across the country and foster frequent communication between the states on ways to improve their pension systems. That way, he believes, the states can achieve needed reforms without confusing federal regulations.

"I think we can put our own houses in order," Elio says. And while the states have a long way to go, the evidence suggests they are beginning to do just that.