Mary E. Carey of Washington Highlands in far Southeast has felt the unmistakable impact of Mayor Marion Barry's drive to quell the District of Columbia's financial crisis without abandoning his campaign pledges to spend more on housing, jobs and economic development.

By many accounts, the budget war was the toughest test of Barry's first term in office. He won the short-term battle, calming fears that the Home Rule government in general, and his administration in particular, could not handle a complex financial matter, and that he could not live up to his campaign promise to lead a competent government.

His comprehensive plan to avoid future crises largely failed. But Barry gained grudging respect from the city's business community and Capitol Hill for his handling of the immediate budget crisis, and he points proudly to this achievement as he seeks reelection.

It was a costly victory for many Washington residents, including 40-year-old Carey, whose plight is a microcosm of the down side of Barry's struggle with rising municipal deficits, cash shortages and mounting salary and pension costs:

On March 31, 1981, after eight years as a D.C. recreation center supervisor, Carey was laid off from her $14,000-a-year job--one of 688 city and school board employes to lose their jobs as Barry tried to reduce spending with minimal cuts in services. Carey says she has been looking for work ever since.

During Barry's first three years in office, a 60-percent increase in assessments on Carey's small, two-bedroom house on Southern Avenue drove up the yearly property tax bill by more than 50 percent, from $239 to $372, despite a reduction in the residential tax rate.

To help balance the budget, Barry increased the general sales tax rate by 20 percent, and Carey paid more when she shopped for food and clothes for her four children. He increased the gasoline tax by 30 percent, and Carey paid more to drive her 1974 Ford LTD.

And yet Carey still is dissatisfied, she says, with many city services, particularly the quality of public schools in her neighborhood. She scrimps to keep two of her daughters in parochial schools while two others live with a relative in Prince George's County, where Carey thinks the public schools are better. Bumpy, pockmarked city streets, especially stretches of South Capitol Street, have been rough on her car.

Carey says she understood the need for cutbacks when the budget deficit was mounting. But in the same year that Carey and her colleagues lost their jobs through reductions in force (RIFs), the Barry administration suddenly wound up with a $68-million budget surplus, leaving Mary Carey baffled and angered.

"Politicians have to realize they're dealing with people's lives," Carey said. "RIFs take a toll on your life . . . I've cried and woken up and sat all night wondering what will happen next. This is what you have to deal with."

Barry says he sympathizes with people like Carey. "You can't say anything to satisfy the human emotions and the real human needs of the people who were reduced in force," he said in a recent interview.

Yet the mayor insists that at the time the RIFs were ordered, he had no idea that there would be a budget surplus and unless he continued his policy of fiscal austerity, the budget deficit would have continued to mount.

"I maintain that we saved the city from financial chaos and from an embarrassment nationally, in the sense that we came from a $105 million deficit in 1980 to a balanced budget in 1981," he said. "That's not easy to do."

The financial crisis, more than any other event, colored Barry's first 3 1/2 years in office, affecting not only how the new mayor spent his time but also how well he could deliver on numerous campaign promises.

The city's financial condition was not a major issue in the 1978 campaign and the full extent of the problems did not surface until after Barry took office.

After the crisis erupted in early 1980, Barry was determined to silence critics on Capitol Hill who privately questioned whether his administration was capable of managing the city's finances.

"Our ability to deal with this money crisis will be viewed as a test of skill," Barry said in an April 24, 1980 speech at the Martin Luther King Jr. Memorial Library.

"I can point out that our financial problems are not due to mismanagement in this administration," he said. "Nevertheless, the consequences of a vast budget deficit in the District would have a terrrible effect on the residents of the District, both in terms of self government authority and in terms of providing critically needed services to our citizens."

The financial crisis changed Barry, the one-time social revolutionary. As a newly elected mayor, he spoke privately of D.C. government as an employer of last resort and vigorously took exception to accusations that the city bureaucracy was bloated.

Yet when the chips were down, the new mayor's answer to the city's financial crisis was to wipe out, mostly through attrition, 3,138 authorized positions--10 percent of the city's locally funded work force--by paring the bureaucracy from 32,038 positions to 28,900. He also cut back some services, let others barely keep pace with inflation and increased an assortment of taxes.

Barry and the council boosted the commercial property tax rate by 16 percent and the tax on business equipment by 10 percent, further fueling fears that city government here is hostile to the business community and helping to continue the flow of businesses to the suburbs.

"The District was simply over-programmed," Budget Director Gladys W. Mack said recently, echoing concerns of urban experts who contended that the D.C. work force was too large for a city whose population had declined 16 percent during the past decade. "There was no way we could find the resources to fund the program base we had."

The city's financial ills did not totally blunt Barry's program initiatives, despite the fact that he had only limited authority to alter the 1979 and 1980 budgets drawn up by his predecessor, Walter E. Washington.

Between 1979 and 1982, the budget as a whole increased by 22 percent, the same rate as the cost of living here. But during that same period, programs the new mayor pushed have prospered. He increased spending for economic development by 36 percent, housing by more than 100 percent, programs for the elderly nearly 600 percent and the arts and humanities, 700 percent.

In other areas, the financial crunch took its toll:

* Between 1979 and 1982, when the crime rate increased by 20 percent, the police department's operating budget (excluding the pension fund) increased only 9.7 percent. Moreover, Barry, who says the effectiveness of the police force cannot be measured by its size, resisted congressional directives to hire 200 additional police officers, giving in only when his budget was in jeopardy.

* The Recreation Department, whose budget has remained almost constant, bore the brunt of the RIFs, losing 137 of the 688 persons laid off citywide. In response, the department reduced its operating schedules for public swimming pools and recreation centers and replaced seasoned supervisors with inexperienced part-time help.

* Barry increased spending for the city's largest agency, the Department of Human Services, and other city government social service agencies by 16 percent, less than the rate of inflation.

As a result, general financial assistance to the needy went down by nearly 30 percent, supplies and services were cut back at city shelters and detention centers for children and personnel were reduced at some of the agency's neighborhood social service centers, according to DHS officials.

* As a candidate, Barry contended that he could do more for the city's public education system as mayor than as president of the school board, a post he held from 1972 to 1974, because the mayor proposes the budget for the school system.

With Barry as mayor, per pupil spending increased from $2,102 in 1979 to $3,357 for 1983--due largely to prodding from the D.C. Council and to declining enrollment, from 113,858 in 1979 to 91,300 projected for 1983.

Overall, spending for public schools has risen gradually since 1979. It reached an all-time high of $306.5 million in the proposed 1983 budget. But again, the major impetus for that was the council, which overruled Barry and approved a new budget $20.7 million more than the $285 million the mayor had recommended.

The cool demeanor with which Barry and aides now discuss the financial crisis is newly found. For nearly two years, they engaged in marathon strategy and work sessions, generating blizzards of dramatic proposals for putting the city's financial house in order.

In the throes of the crisis, municipal penny-pinching reached a point where the amount of toilet paper to be purchased for city agencies was the subject of a meeting of the city administrator, the city controller and the head of the mayor's cash-management team.

Repeatedly, Barry and City Administrator Elijah B. Rogers warned of impending catastrophe unless Congress went along with the mayor's oft-revised game plans for refinancing the city's debt and straightening out its cash flow problems.

When Barry took office, the city's accumulated deficit, long papered over, already had risen to $284 million, and quirks in the tax-collection system continually caused cash shortages that sent city officials scrambling to the U.S. Treasury for short-term loans.

Congress had shifted to the city responsibility to make pension payments to firefighters, police officers, teachers and judges, but neglected to provide enough money to cover the cost of accrued benefits.

And Barry was pressured by a financial oversight commission of Congress to quickly put in place a highly sophisticated, computerized financial-management system that baffled many of the city employes who were supposed to use it.

Philip M. Dearborn, the mayor's former financial counselor, now says that the administration's worst mistake was agreeing to switch to the new system on Oct. 1, 1979--far too soon to make a smooth transition.

As a result, Dearborn said recently, the administration virtually "lost control of the city's finances" during fiscal 1980 and ran up a $105-million deficit that drove the city's accumulated debt to $389 million.

Congress also pressured Barry's administration to straighten out the city's long-tangled books. Eventually the D.C. government hired two firms who in February 1981 issued a 100-page report that represented the first unequivocal, independent analysis of the city's finances--a watershed in D.C. government.

Barry had three main goals in dealing with the city's financial woes. He wanted to eliminate perennial cash flow problems, whittle away at the accumulated deficit and end dependence on the Treasury for long-term loans (which carry higher interest costs than money borrowed in the private bond market) to finance building and roads projects.

So far, he's largely failed at all three.

Key members of the House have all but killed his request for Congress to grant the city either loans or bonding authority to refinance about half of its accumulated debt.

Barry proposed that the city pay off the other half of its accumulated deficit by setting aside $10 million a year for debt retirement. However, both the mayor and the council decided this year that the debt-retirement funds could be better spent on the public school system--a popular decision in an election year.

Congress did approve Barry's request for changes in the Home Rule Charter to enable the city to sell municipal bonds to finance future long-term capital improvements.

However, the authority is of little use until the city obtains a suitable credit rating from bond rating firms--something it is not expected to be able to do before late 1982.

Barry describes his ill-fated financial recovery plan as "the most solid proposal anyone came forward with," and blames Congress and the council for its failure.

"I'm not responsible for the recalcitrance. . . of Congress," he said. "I took the message . . . to them. And I'm not going to be held a victim because they would not OK that plan."

He acknowledges that he and the council bowed to election-year political pressure by shifting funds in his 1983 budget proposal from debt retirement to the public schools.

The criticism of his handling of the crisis that began in the council chambers continues on the campaign trail: He was slow to identify the true magnitude of the city's accumulated deficit. He was either inept or devious in projecting government spending and revenues. He led the city, unnecessarily, on a budgetary roller-coaster ride in 1981--first warning of a $60 million potential deficit, then predicting a $7 million surplus and finally sticking out his chest for a surprising $68 million surplus at year's end.

A combination of stringent cost-saving measures and a windfall of $51 million in unanticipated tax revenues contributed to the turnabout. As a result, the city's accumulated deficit shrank to $309 million--a vast improvement but still considerably more than when Barry took office.

Barry no longer talks about a financial crisis. He does talk about, and takes credit for, obtaining a record $336 million federal payment from Congress in 1982, and cites the payment as proof that he has improved the city's relations with Capitol Hill.

That view is not shared by some key Congressmen, however, including Rep. Stewart B. McKinney (R-Conn.), ranking minority member of the House District Committee.

"Barry and the City Council on the whole don't have good relations with the Hill, but they do with a few key members," McKinney said. "Barry has done better than Congress did in running the city ," McKinney said. "But the real proof of the pudding won't come until a second administration."

In some respects, Barry's handling of the city's financial crisis is written in the lives of Mary Carey and others in the city.

The mayor did little to interrupt the exodus of middle-class families fleeing a combined burden of property, sales and income taxes that is the highest in the Washington area and, according to a D.C. Department of Finance and Revenue study, the sixth highest in the nation.

"We've been under pressure to raise revenue, and we've not had an opportunity to reduce it, to provide tax relief for the middle class," said Carolyn L. Smith, director of the Department of Revenue and Finance.

Barry acknowledges making some mistakes and falling short on some of his campaign promises. But he says he is proud of having moved the city "from the brink of a financial disaster" to relatively sound footing.

"It does not mean that we have all the resources we need and it does not mean that we have every problem solved," he said. "But it means that we basically kept our commitment to the people."