The federal takeover of mortgage giants Fannie Mae and Freddie Mac will likely lower the cost of a mortgage for buyers with good credit, but it will also likely stick U.S. taxpayers with a bill in the tens of billions of dollars, analysts have concluded.

The mountain of losses by the two huge quasi-governmental agencies threatened the entire mortgage and credit industry since Fannie and Freddie, as they are popularly known on Wall Street, back up nearly half of the country's mortgages.

Both companies were placed on Sunday into a government conservatorship that will be run by the Federal Housing Finance Agency, the new agency created by Congress this summer to regulate Fannie and Freddie.

Their top executives were fired and replaced by Wall Street veterans. Herb Allison, 65, a former president of Merrill Lynch who most recently led the TIAA-CREF pension fund, will take the corner office at Fannie Mae. David Moffett, 56, a former U.S. Bancorp executive who last year joined the politically powerful Carlyle Group private equity firm, will become CEO of Freddie.

That's because investors will be more willing to buy the debt issued by Fannie and Freddie -- and at lower rates -- since the federal government is now explicitly standing behind that debt.

null

"Effectively, the federal government has now become the nation's mortgage lender," Zandi said. "This takes a major financial threat off the table."

There are initial signs that the government's actions are having the hoped-for effect. U.S. stock futures jumped more than 1 percent and pointed to a huge rally today. World markets also soared on the news of the takeover.

Federal Takeover: Refinance and Mortgage Protection

U.S. bond futures, however, tumbled as the plan raised concerns about the additional debt the government might take on.

Analysts are debating how large the taxpayers' bill will be.

"My guess is that it will be in the tens of billions of dollars," Doug Kass, founder of Seabreeze Partners Management Inc., told "Good Morning America."

Kass said the deal puts the U.S. government "on the hook for an additional $4 or $5 trillion dollars of mortgages," although only a small percentage of those loans will likely default.

Treasury Secretary Henry Paulson refused to estimate how much the takeover of the two companies will cost the government, but he insisted that taxpayers will get paid back first.

"We structured this facility to protect the taxpayer," Paulson said today on the "CBS Early Show." "The government will be repaid ... before the shareholders of these companies get a penny."