The Treasury Department said on Monday it made a $25 billion profit on sales of mortgage-backed securities acquired during the financial crisis, part of its ongoing efforts to wind down taxpayer-financed bailout programs.

The sales were the latest indication the multiple programs the government and Federal Reserve initiated to bail out the financial sector may turn out to be less costly than originally feared.

The Treasury bought $225 billion of MBS in 2008 and 2009 in an effort to keep the mortgage market from freezing up as private investors fled. The $250 billion it reaped from the investment reflected both principal and interest.

The successful sale of these securities marks another important milestone in the wind-down of the government's emergency financial crisis response efforts, Treasury Assistant Secretary Mary Miller said.

The government purchased the mortgage debt as part of a bid to stabilize the housing industry, using funds authorized by the Housing and Recovery Act of 2008. It was one of several programs running in parallel with the Troubled Asset Relief Program, or TARP, which was set up during the administration of President George W. Bush to buy toxic assets from banks, but that ended up largely as a mechanism to inject capital into financial institutions.

Economist Douglas Lee, who heads advisory firm Economics from Washington, said it seems inevitable the government will end up with substantial losses on the bailout effort but it was appropriate to try to reap gains where possible.

A lot of these assets that were acquired were distressed at the time that they were bought so the chances of coming out ahead in selected areas is quite good, Lee noted, such as on the mortgage-backed securities.

Over the long haul, though, the effort to rebuild a reliable housing finance system means that costs for subsidizing operations of firms like Fannie Mae and Freddie Mac will continue to be costly, he noted.

Investments in insurer AIG and in automakers are likely to prove hard to fully recoup. Earlier this month, the Treasury said it was selling 206.9 million shares of AIG, which still would reduce the government's stake in the company to 70 percent from 77 percent.

You have to say that these programs have worked in the sense that it's restored a sense of stability that we sought, Lee said, But now it is right to have the government back out and let the private sector get on with their job.

Many critics contend it did more to prop up Wall Street than Main Street, and anti-bailout anger helped fuel both the conservative Tea Party movement and Occupy Wall Street on the left. Treasury Secretary Timothy Geithner has argued the steps the government took helped prevent a deeper economic downturn.

Some $414 billion was paid out in TARP funds in a process that gave the government preferred stock in banks, other financial firms and some automakers in return for the public investment. Some of the preferred stock was later converted to common stock in some of the firms. A Treasury official said that to date $331 billion has been repaid, including dividends and interest earned on the preferred shares.

While the TARP program currently is $83 billion in the red, the Treasury projects losses will ultimately shrink to about $68 billion. The nonpartisan Congressional Budget Office has a lower loss estimate of $34 billion.

Taxpayers, also stand to lose from the bailout of mortgage finance firms Fannie Mae and Freddie Mac , which were placed into government conservatorship in 2008. The government has lost $151 billion on its investments in the two companies, but the Obama administration projects that loss will fall to $28 billion by 2022.

The Treasury began selling the mortgage securities last year. In January, it had completed sales from a separate, smaller portfolio of asset-backed securities it had acquired to boost credit availability for small businesses.

Sales from both portfolios went smoothly with little or no market disruption.

(Reporting by Glenn Somerville; Editing by Neil Stempleman; and James Dalgleish)