Mayor Marion Barry yesterday released figures indicating that the D.C. government will close out the fiscal year on Sept. 30 with a balanced operating budget, in part by making last-minute cuts in spending authority for the public schools and the court system.

Barry, who earlier this year faced a potential deficit of $110 million, gradually closed the spending gap with a combination of across-the-board cuts in most agencies and improved revenue collections.

A final round of cutbacks totaling nearly $39 million, revealed by the mayor yesterday in a letter to City Council Chairman David A. Clarke, included reductions of $7 million for the schools and $640,000 for the D.C. court system.

Both the D.C. Board of Education and the courts resisted earlier attempts by Barry to cut their budgets. The school board voted Aug. 31 to take legal action against the city to prevent it from imposing a new purchasing policy this year that had the effect of cutting $7 million from the school's $306.5 million operating budget.

But Barry's administration yesterday sidestepped the legal squabble with the school board by rescinding the new purchasing policy for this year and instead invoking a city charter provision that allows the mayor to apportion any potential deficit among all city agencies, including the school board.

Alphonse G. Hill, deputy mayor for finance, informed D.C. School Superintendent Floretta D. McKenzie by letter of the mayor's decision to cut the current school board budget by $7 million by exercising his "apportionment authority."

Hill added that the new procurement policy, which forbids agencies from carrying financial obligations made in one fiscal year over to the next, will go into effect in fiscal 1984, which begins Oct. 1.

McKenzie said late yesterday that her legal staff was reviewing Hill's letter. "I don't know what they Barry's administration mean except that they are still trying to reduce the budget," McKenzie said. "That is the bottom line. . . . No matter how it comes out it seems as if millions of dollars will be lost from the school system in materials and equipment."

In his letter to Clarke outlining the latest city spending levels, the mayor said that the schools and the courts cannot expect other agencies to carry the full burdent of cutbacks.

"If the schools and courts were to be excluded from cost saving initiatives an enormously disproporitionate burden would fall on our other important services," he said. "I believe that such a disproportionate burden would be both unfair and unwise."

The revised fiscal 1983 budget, totaling $1.76 million, includes $20 million to help retire the city's accumulated deficit, which currently totals $296 million. Congress insisted that the city include funds for debt retirement this year.

Most agencies directly under the mayor's control incurred spending cutbacks averaging 2.2 percent from the original, congressionally approved budget level, according to administration's figures. Spending levels for independent agencies, including the schools and the courts, were reduced by 1.3 percent.

If Barry's figures hold up, 1983 will mark the third consecutive year in which the administration has balanced its general operating budget. Massive deficit spending still persists within the city's water and sewer fund. However, the mayor and the city council have approved a series of sharp increases in rates that gradually will put the water and sewer fund on a pay-as-you-go footing.