More than 8,000 retired D.C. government workers received a nasty surprise with their February pension checks -- a letter from Mayor Marion Barry saying their pensions "may be jeopardized" by the city's shortage of money.

Barry said the purpose of his letter to retired schoolteachers, police officers, firefighters and judges was "in no way to alarm or upset you," but to ask support for congressional legislation providing more pension money.

The mayor said legislation soon will be introduced that would provide $175 million in federal funds every year for 29 years -- more than $5 billion overall -- to meet the pension obligations of retirees who worked for the city before the advent of home rule in 1975."The city and other retirees will need your help in lobbying" for that bill, the mayor said. "I will alert you when hearings are scheduled."

This is not the first time that Barry has sounded the alarm about the problems of the city-administered pension programs. He first proposed the $5 billion in additional federal assistance in the long-range financial program he unveiled last July. But this is the first time Barry has publicly suggested that the pension payments of persons already retired might be threatened.

"That letter upset a lot of people unnecessarily, probably more than the mayor realized," said Alden C. Kefauver Jr., a retired deputy fire chief who was sworn in by Barry two weeks ago as a member of the Retirement Board, which now controls the investment of city pension funds. "It came as a surprise."

The mayor said his intention was "not to alarm, but to alert. I intend to mobilize those people. This is not my fight. It's time for them to get involved in fighting for their own survival." He said many of the retirees, living outside the District, have representatives in Congress whom they and their families and friends could lobby on the pension legislation.

The pension problem has been obscured by the city's more immediate financial crisis and the discovery of cash shortages and operating deficits. But pension payments have been identified by the city's financial consultants as a time bomb that will be costing D.C. taxpayers $700 million a year by 2005 unless Congress puts up more money.

Before home rule, the pensions of city workers were paid out of the federal government's operating budget each year. More than half of the city's workers are still covered by the federal civil service pension program and are not affected by the District's financial squeeze. But the pensions of police officers, teachers, firefighters and some judges are now administered by the city, which with home rule acquired an obligation to pay pensions of all workers in those categories by no funds to do so. The District is laying out more than $100 million a year, one-fifteenth of its operating budget, to pay those pensions Benefits average about $17,000 a year for teachers and police officers, $19,000 for firefighters.

Congress has already grappled twice with this issue since home rule started. In 1978 Congress agreed to provide $1.75 billion in federal pension funding over 25 years, but that bill was vetoed by President Carter. A new bill, enacted a year later, provides $52 million annually through the year 2004, for a total of $1.3 billion.

The amount was thought at the time to be sufficient to cover the pension obligations to all eligible workers who had accomulated benefits before home rule. But the city now says it will cover only about 24 percent of the benefits that will be paid out over the next quarter-century as more workers retire and pension payments rise with inflation.

In his letter to the retirees, Barry said Congress would have had to provide $2.7 billion in a lump sum to cover the full obligation at the time of home rule. Having failed to do so, he said, Congress now should come up with the additional $175 million a year to meet its obligation to retirees who "worked long and hard" to earn their pensions.