WASHINGTON - The government's Christmas Eve pledge of unlimited financial aid to mortgage giants Fannie Mae and Freddie Mac is aimed at making sure the housing market does not take another turn for the worse and cause the economic recovery to unravel.

This insurance policy taken out by the Treasury Department will help keep mortgage rates low, and it may wind up being a gift of sorts to struggling homeowners and banks. But there is a catch: The housing crisis is now likely to cost taxpayers much more.

The Obama administration's latest lifeline to Fannie and Freddie will cover unlimited losses through 2012, lifting an earlier cap of $400 billion. It also eases restrictions on the size of the companies' investment portfolios. That is a reversal of the Bush administration's September 2008 plan to shrink the size of the companies' holdings of mortgage-backed securities.

The action, which did not need the approval of Congress, could position Fannie and Freddie to get more aggressive in dealing with the housing crisis, perhaps taking troubled mortgage investments off banks' books.

"They've cleared the decks to use Fannie and Freddie as a vessel for whatever they want," said Edward Pinto, a housing consultant who was Fannie's chief credit officer in the late 1980s.

Treasury could also lean harder on Fannie and Freddie to help troubled homeowners avoid foreclosures - and by extension the banks and other investors who own their mortgages. Many economists and housing experts say a $75 billion government program to prevent foreclosures is not working fast enough, threatening the emerging signs of home-price stability in many cities.

Boosting the firepower of Fannie and Freddie, which finance three quarters of all new mortgages, also should help keep rates on home loans low just as the Federal Reserve starts dialing back its separate $1.25 trillion program aimed at doing that.

That is good news for the banking industry, which has benefited this year from homeowners refinancing their mortgages, says Jason O'Donnell, senior research analyst at Boenning & Scattergood Inc., of West Conshohocken, Pa. "This is an initiative that spreads far beyond just Fannie Mae and Freddie Mac," he said.

But the trade-off is that the Treasury will have to cover much more than the $111 billion in losses at Fannie and Freddie it already has funded. Barclays Capital predicts the losses will range from $230 billion to $300 billion.

Both companies provide vital funding for home loans, buying mortgages from lenders, pooling them into bonds, and selling them to investors with a guarantee against default. While they traditionally backed loans to relatively safe buyers, they dramatically lowered their standards during the housing boom, and those loans are now defaulting in higher numbers.

If the administration does lean on Fannie and Freddie to expand its foreclosure-prevention program, it would be pricey. If Fannie and Freddie were, hypothetically, to start forgiving a quarter of borrowers' mortgage debt, that would cost an additional $125 billion to help about 2.5 million to 3 million borrowers, estimates Barclays analyst Ajay Rajadhyaksha.

The Treasury Department says its only motivation is to make sure investors remain confident that Fannie and Freddie can keep doing their jobs of buying the bulk of mortgages made in the United States and turning them into investments.

Fannie and Freddie must convince everyone from the Chinese central bank to hedge funds to individual investors that it is still safe to buy their debt securities, which they sell partly through weekly auctions.