The Department of Housing and Urban Development this week sold 58,000 government-insured mortgages for about $40 million less that the combined unpaid balances of the loans, the agency said.

Sale of the loans was part of "efforts to cut costs and streamline operations," HUD Secretary Samuel R. Pierce Jr. said in an announcement of the transaction.

The loans, all single-family residential mortgages guaranteed by the Federal Housing Administration or insured by the Veterans Administration, were sold by the Government National Mortgage Association, known as Ginnie Mae, in pools of mortgage-backed securities. Ginnie Mae is a federally owned corporation within HUD, established to provide mortgage funds by guaranteeing payment of principal and interest on securities backed by pools of government-insured loans.

Total unpaid balance of the mortgages was about $475 million, and the sale brought in $435 million, according to Louis C. Gasper, executive vice president of Ginnie Mae. "The idea was to sell off assets at the best price possible," he said.

Interest rates on the loans ranged from 1 percent to 13 percent. An industry expert said discounted sale prices are necessary to make the securities attractive to purchasers. The government loss is not as great as it appears, because "it was costing them to hold the loans," he said.

The proceeds of the sale would go into the Treasury because Ginnie Mae is required by law to return the money to the program or fund under which the mortgages were acquired or to the Treasury, according to Gasper. Most of the loans were purchased through government programs that no longer exist, and others were acquired from its predecessor agency when Ginnie Mae was created, he said.

The loans were sold through mortgage-backed securities issued by the Federal National Mortgage Association because Ginnie Mae securities can contain only newly issued loans.