Freddie Mac, the giant mortgage funding company, said yesterday that it is getting out of the business of making a market in mortgage-backed securities.

The company, based in McLean, will continue to invest in mortgages and mortgage-backed securities, one of its core activities. But it is shutting down a unit that used the firm's capital to actively trade in such securities.

As of Dec. 31, the unit held $32 billion of assets, which will be sold to other investors or acquired by Freddie's investment portfolio, spokesman Douglas Robinson said.

The elimination of the trading unit is part of a continuing reordering of the company under chairman and chief executive Richard F. Syron, who took over at the end of last year after an accounting scandal forced out two Freddie chief executives in rapid succession.

The company's securities sales and trading group being phased out played a central role in some of the activities regulators criticized last year. In one series of transactions, Freddie moved assets from that unit to its larger investment portfolio via trades with other firms at a time when the unit was not allowed to make the trades directly, regulators alleged.

The "prearranged" trades violated internal policies of Freddie Mac, contributed to Freddie's need to correct billions of dollars of accounting errors and distortions, and raised questions about Freddie's internal controls, the Office of Federal Housing Enterprise Oversight said in a December report.

The market-making function of the trading group helped support demand for mortgage-backed securities issued by Freddie Mac. Robinson said Freddie's investment portfolio and major Wall Street firms will continue to buy those securities.

"At the end of the day, market-making was not something that Mr. Syron felt we needed . . . to do," Robinson said.