Mayor Marion Barry, in his nine years in office, has presided over one of the most rapid expansions in District government since the city's founding in the early 1800s. He has done it with the help of booming office construction downtown, a bustling local economy and increasing federal dollars.

But now reductions in federal support for the District, and the possibility of a nationwide recession, indicate that key revenue to District government is flattening. That has major implications for the governing style of Barry, who has known only economic growth for the past five years.

Barry acknowledged in an interview last week that -- based on his aides' forecasts that D.C. soon will face annual budget deficits of $200 million -- the shape of Barry's government may change in the near future.

"I have to make some tough decisions, reduce some programs in some instances," said Barry, who presented his $2.8 billion fiscal 1989 operating budget last Monday. "That's what leadership is about."

The mayor expressed optimism that he will find money to close budget gaps. But he conceded that it will not be easy. Barry said that since autumn he has been working long days to reduce a $134 million deficit in the current year's budget, and he said the experience has been distinctly unpleasant. "My head was hurting . . . . I didn't come here to cut budgets."

The District's economy is still stronger than most cities', in part because of the presence of the federal government and its entourages of lobbyists and consultants.

But a number of factors -- expected federal cutbacks, a new federal tax law that discourages some real estate investment, and shock waves from October's stock crash -- likely will prompt a leveling in some D.C. revenue. That will happen just as the city's spending needs are expected to move upward because of crises in corrections, the police and fire departments, narcotics treatment and D.C. employees' pensions.

This year could be a turning point in this administration, when Barry the beneficent becomes Barry who bites the bullet.

After an early rough patch in Barry's first two years as mayor -- he faced serious funding shortages, an accounting system in disarray and an angry work force -- the mayor has enjoyed increasing prosperity in his realm. He has been able to provide money to contend with most emergencies, from prison crowding, the homeless and community mental health to public housing and the schools.

The city's commercial gusher has allowed Barry to have it all, essentially avoiding employee cutbacks and major tax increases. He is generally viewed as having ruled generously, ensuring labor peace and overseeing a doubling in the size of District budgets and an increase in the number of city employees.

Including slots funded by federal grants, there were 39,058 city employees in 1982, and 41,236 now. Barry is proposing 44,480 in 1989.

The growth in the personnel rolls -- which would be 14 percent between 1982 and 1989 if Barry's spending plan is approved by the D.C. Council -- has prompted sharp criticism from council member John A. Wilson (D-Ward 2).

Wilson, a continual Barry critic on financial matters, said that personnel rolls are inflated and out of scale for D.C. "The city has to stop being an employment agency of last resort," Wilson said. "Something's got to give."

If D.C. budget officials are right, something will have to give. The officials estimated that by 1990, the city will have a $79 million deficit, with the gap rising to $140 million in 1991, $190 million in 1992 and $218 million in 1993. That is why Barry, who is required by law to balance his budget, proposed income tax increases last week.

In some ways, however, Barry does not act like a mayor of a financially distressed city. Although he proposed cuts in some social service programs, his new budget calls for an overall 8.5 percent increase in spending. And he said his proposal for tax increases should not be described that way, but rather as "revenue enhancements."

By whatever name, they reflect officials' mounting anxiety about fiscal matters. Last week, in a report projecting future budgets, the city budget office said D.C. must undertake "an exhaustive reexamination of District programs . . . . The 1990s will test the innate strength of the economies of the United States and the District." Difficulty in financial markets is adding "considerable uncertainty to the immediate economic outlook," the budget office said, with "sluggish" growth expected here and nationwide.

Nearby suburban counties would be hit by the same sluggishness if it comes, but they have varying responses to it.

Montgomery County officials are confident that the county would not have to repeat this year's experience -- the county's first property tax rate increase in seven years -- but county budget director Robert K. Kendal said that "we, like everyone else, are trying to guess if the flattening of the economy is going to happen."

In Fairfax, County Executive J. Hamilton Lambert said he sees few danger signals for that county's budget and its "long-sustained economic boom." Expected revenue from planned mega-developments along the Rte. 28 and I-66 corridors, Lambert said, will provide adequate cushion for any downturn. In any event, he said, Fairfax is less dependent on federal aid than is the District.

And that helps explain D.C.'s vulnerability. The biggest peril to the city budget, in this time of mounting spending, is federal thriftiness, officials said.

The District suffers from a dangerous ripple effect when the federal government reduces outlays to contractors, who then pay less city business taxes. And because about one-third of the city's 330,000 taxpayers are federal employees, the District suffers when the federal government keeps its workers' pay low. Their relatively small salary increases, 3 percent last year and 2 percent this year, affect D.C. income and sales taxes.

And the District is affected directly by outright federal cutbacks to its programs and an expected flattening of the annual federal payment to the city.

"Constant uncertainty" about the federal support to the District gives "a real hint of gloom," the D.C. budget office said.

District officials are not as gloomy about real estate taxes. But they are not as gleeful as they were in the recent past when the city enjoyed the fruits of one of the nation's most dramatic real estate booms, especially in downtown's east end.

During the Barry years, properties in the city have tripled in value -- either through normal appreciation or new construction -- from $10.6 billion in 1979 to $31.8 billion this year. Tax revenue on commercial properties increased almost twice as fast as that 200 percent rate.

D.C.'s overall property tax revenue, both residential and commercial, has been increasing faster than most cities'. Federal statistics show that from 1979 to 1985 -- the last year for which comparative figures are available -- D.C.'s property tax revenue went up 111 percent, while those of 24 other large U.S. cities increased an average of 41 percent, said Doug Peterson, an analyst for the National League of Cities.

Barry often has said his favorite real estate projects are hotels, in part because they bring in staggering amounts of taxes -- including a 10 percent tax on hotel bills, plus stiff real estate and sales taxes. "We're practically equal partners with them," one D.C. budget official said of hotel owners. One hotel alone, the new Grand Hyatt downtown, yields the District $8 million a year.

Barry frequently claims credit for the downtown boom because his administration built the Washington Convention Center and reduced developers' red tape. But industry officials generally scoff at that, saying Barry had little effect on the blossoming market. Donald Slatton, executive vice president of the Apartment and Office Building Association, said that the office building industry is "the goose that lays the golden eggs" for the District, enabling Barry to launch his vaunted social programs.

But the best years may be ending. In the past, federal law encouraged development through valuable tax breaks, even for financial losers. But tax law changes that are now going into effect provide a disincentive for risky projects.

Industry officials said this will result in a development slowdown downtown, as across the country. Local architects and planners say they already are getting less work. Now, few developers are building office structures without office tenants lined up in advance. "The financial people are saying to developers, 'Who's your lead tenant?' " Slatton said. "Developers are saying, 'If I don't have 30 or 40 or 50 percent {preleased} in the bag, I better go slow.' "

Besides realizing the limits of real estate growth, city officials are concluding that they have wrung the available revenue from a number of other industries and consumer groups.

City officials said they are wary of raising corporate taxes because of business executives' complaints that their D.C. taxes and fees are so high they discourage city investment. In November, a Greater Washington Board of Trade study of such corporate costs found that the District has by far the highest in the area.

And officials forecast distressing numbers through the 1990s from the D.C. lottery -- no revenue increase at all. That is particularly disappointing because the lottery grew so quickly after its 1982 start, by 724 percent, to $40 million last year. Lottery officials say they have attracted all the betting they ever will from the games' main audience, the area's poor and working people, and mostly pin hopes on attracting more middle-class gamblers.

The city's middle class has always been a main source of the District's inheritance and estate tax revenue, which has risen 164 percent in Barry's term, to $27 million last year. But the tax rates were so high, and so many middle-class elderly were considering moves to the suburbs to escape the bite, that last year the city slashed the rates drastically. That will bring a 63 percent drop in that tax's revenue next year.

Officials reckon that it was worth the loss because it will keep more well-to-do people in the city paying income taxes. The D.C. income tax is the city's top revenue source, and the top-earning 5 percent of taxpayers, those earning more than $50,000, pay 32 percent of the city's taxes.

In the long run, many officials believe, retaining the city's middle and upper classes is the most crucial challenge in D.C.'s fiscal future.

The danger of high city taxes driving away young professionals and the stable middle class is one reason Wilson has consistently fought Barry's attempts to raise income taxes, and why he says he will oppose Barry's latest such proposal. Wilson said that Barry sees well-to-do people as little more than revenue sources for his city spending programs.

"You can't keep milking the taxpayer like this," Wilson said. "Eventually, people are going to rebel."

But Wilson notes that he is one of the few politicians or activists to raise the issue. Barry has learned, Wilson said, that he does not need the well-to-do vote, particularly whites who live west of Rock Creek Park. "That's the reason the mayor doesn't fear raising income taxes," Wilson said. "It doesn't affect him politically."

The mayor said Wilson misstates Barry's views and exaggerates the dangers of exodus. Barry said he is taking care not to drive away the middle class. But he added that he is largely unconcerned because the city's quality of life will keep prosperous people here, even with income tax increases.

"Nobody's going to leave Washington for $200," Barry said.Staff writers John Ward Anderson and Jo-Ann Armao contributed to this report.