The District of Columbia government said yesterday it had recovered the $10 million it had invested with a New Jersey-based government securities firm that went bankrupt this week by seizing and selling collateral that had been posted by the firm.

In announcing the action, Mayor Marion Barry defended the city's decision to invest with Bevill, Bresler & Schulman Inc. despite a warning from a senior cash-managment analyst that the firm was "thinly capitalized" and the city was risking its credibility in the financial community by making the investment.

"Under my administration, the District has been an aggressive investor and always is searching for a higher rate of return so that we can get the most for our residents," Barry said. "I have complete confidence in the expertise of my top financial staff and in their ability to invest the District's funds prudently and safely."

The city recovered the funds after lawyers for the District and First American Bank of Washington, the custodian of the government securities that were put up as collateral, resolved differences over the legality of seizing and selling the collateral amidst bankruptcy proceedings involving BB&S and four related entities.

First American officials were concerned that the bank might be held liable if it were later determined that the District was not entitled to the collateral, according to a D.C. government source. At one point, the bank sought assurances from the city that it would be held harmless in the event of a legal challenge.

Alphonse G. Hill, the deputy mayor for finance who ordered that BB&S be added to the city's list of approved investment organizations, said yesterday that First American was persuaded that the city was entitled to the funds under federal bankruptcy law.

"The bank had one legal position, and we had ours," Hill said. "It was all straightened out . . . . We made no assurances to the bank per se . . . . We've not made any guarantees."

A spokesman for the bank declined to comment.

BB&S was designated by the city as an approved investment firm in December, shortly after Hill and Fred Williams, the assistant D.C. treasurer, visited the firm's headquarters in Livingston, N.J.

About two weeks later, on Dec. 14, Alvin C. Frost, a senior cash management analyst in the controller's office, wrote to Williams expressing concerns about "the potentially negative impact that this firm could have" on the District's credibility in the investment community.

"I am considerably concerned at your insistence, during a meeting between you and I on Dec. 12, 1984, that I show some response to the deputy mayor for finance's desire to place some business on the books with BBS," Frost stated in the memo.

Frost went on to say that the speed with which BB&S was added to the city's investment list "tends to give the appearance of making the decision with regards to BBS based upon insufficient or undisclosed information, or upon some external and possibly personal factors which could further the appearance of impropriety."

Yesterday, Hill denied that he ever saw the memo. He said that he had spoken with BB&S officials, off and on, for about five months before deciding to add them to the list. The city invested twice with the firm, including the $10 million transaction that was made April 2.

"There was no pressure exerted on anyone, especially a senior cash management analyst, to make any kind of decision with respect to trading," Hill said.

Hill insisted that Frost, as the senior cash management analyst, "made the decision to invest" the $10 million with BB&S -- which is contrary to Frost's assertion in his memorandum that he felt pressure from Williams and Hill to place the funds with BB&S.

City Council member John A. Wilson (D-Ward 2), chairman of the Finance and Revenue Committee, said yesterday that he intends to order a review of city investment policies in light of the concerns raised by Frost's memorandum.

Technically, the District loaned the $10 million to BB&S to earn interest, and took possession of government securities as collateral. That way, if BB&S were not able to repay the loan, the city presumed it could sell the securities.

Some bankruptcy experts said this week that it is not entirely clear under 1984 amendments to the bankruptcy law whether the city can recover its entire investment by selling the collateral.

Hill said that the city's policy was to seize the collateral immediately and worry about legal challenges later.