The first real skirmish of the Maryland governor's race heated up today as Mayor William Donald Schaefer defended a city development deal that cost $5.7 million in funds his critics say were never specifically authorized by the agency supposed to approve such expenditures.

Baltimore's mayor, who has been drawn into a dispute over the project with his principal opponent for the Democratic gubernatorial nomination, Attorney General Stephen H. Sachs, as well as with the city comptroller and Baltimore newspapers, said the issue has been overblown.

But that didn't mollify Sachs, who told a reporter later: "It is difficult for me to accept the legitimacy of a transaction that . . . is an open-ended agreement to a financial and political backer of the mayor."

The transaction, which came to light last month as the result of a lawsuit, took place in 1982. In that year, millionaire developer Henry J. Knott, a major Schaefer supporter, wanted to purchase a luxury apartment complex in the city's fashionable Bolton Hill neighborhood.

One day, at a meeting of the city's Board of Estimates, which approves city expenditures, Knott won an agreement that the city would pay for any needed repairs in the 65-unit Beethoven apartments, a Victorian building that had been damaged by fire. No dollar limit was placed on the expenditures, and, at the end of a long meeting, the deputies to three board members approved the city's commitment. Schaefer, a member of the board, was not present.

Schaefer's critics say the city trustees, two Schaefer appointees who administer a $100 million loan bank for risky development projects, should have returned to the board with specific cost estimates before agreeing to pay Knott's renovation costs. That didn't happen.

Schaefer, who listened today at a meeting of the board to accounts of the actions taken, defended the process, saying, "It seems to me there was no secret as far as the reports [on the transaction] are concerned."

Knott bought the Beethoven property for $6.9 million in 1981 after a group of developers defaulted on a loan made by the city trustees, then, after getting the go-ahead from the Board of Estimates, used money from the trustees to make renovations.

One of the two members of the trustees, Charles L. Benton, who is also Baltimore's finance director, said at today's board meeting that "there has never been any attempt to conceal expenditures or other information in possession of the trustees. I have repeatedly stated that there is more, much, much, more, reporting and disclosure of trustee transactions than regular city transactions."

The city's arrangement with Knott came to light in court papers filed with a suit the trustees have brought against the developers from whom Knott purchased the property, Beethoven Joint Venture. In a deposition taken from Benton in connection with that case, he was quoted as saying that he avoided the Board of Estimates "like the plague." The board is the only public body that the trustees answer to.

Benton apologized for that statement in his remarks to the board today.

Benton's "plague" characterization and details of the agreement were first reported in stories in Baltimore newspapers that caused the mayor to call the reporters who wrote them "scandal mongers" and, in one case, a "son of a bitch."

Schaefer shrugged off Sachs' criticisms today by saying the attorney general should pay attention instead to the state's saving and loan crisis.

Of city officials, only Baltimore Comptroller Hyman A. Pressman expressed unhappiness with today's explanation from city auditors and Benton.

"In my opinion, the trustees had no right to enter into a contract with Mr. Knott in which they agreed to pay Mr. Knott his counsel fees, costs and expenses and to create and replenish a revolving fund which eventually spent millions of dollars without . . . getting Board of Estimates approval," he said.

Schaefer dismissed Pressman's objections and said the trustees have been an effective development tool for the city and have supported necessary city projects that would otherwise have failed.