NEW YORK (Fortune) -- It took two months, but the bond market called Henry Paulson's bluff. Now the Treasury Secretary is expected Sunday to announce a plan to take Fannie Mae and Freddie Mac under government control.

The mortgage giants are expected to be placed under a "conservatorship" of their new regulator, the Federal Housing Finance Agency. The agency would likely temporarily run Fannie and Freddie and continue to implicitly back any liabilities until the two companies' financial standing was strengthened. A Treasury official confirmed that regulators were working out details of an intervention plan on Saturday.

In July, Paulson attempted to calm financial markets by pledging government support for Fannie (FNM, Fortune 500) and Freddie (FRE, Fortune 500), which were under siege by investors because of fears about their weak balance sheets.

Paulson asked Congress for the right to use taxpayer funds to intervene - but hoped the pledge alone would be sufficient. "If you have a bazooka in your pocket and people know it, you probably won't have to use it,'' he said at a July 15 Senate Banking Committee hearing.

But now Paulson is readying the bazooka, because the markets didn't respond as hoped. Shares in the companies bounced back from multiyear lows in recent weeks, but bond markets have not regained confidence in Fannie and Freddie.

The amount the companies pay to borrow in the bond market has risen sharply during the past year.

Fannie and Freddie rely heavily on their ability to borrow money at good rates, which they use to buy mortgages from lenders - they now own or guarantee some $5 trillion in home loans.

Investors began shunning debt issued by Fannie and Freddie in favor of U.S. Treasury bonds. On Friday, yields on the 10-year Treasury note hit a five-month low at 3.55%, down a full percentage point from a year ago. This reflects greater demand for the perceived safety in Treasuries.

Foreign central banks, particularly China's, have in recent years been among the biggest buyers of "agency" bonds, those issued by Fannie, Freddie and other government entities. But they've been backing away. Brad Setser, an economist at the Council on Foreign Relations, noted last month that Federal Reserve data showed foreign central banks were, for the first time in four years, net sellers of agency bonds.

A statement Saturday from the office of Barney Frank, D-Mass., confirmed that Paulson said he plans to use "the powers that Congress provided it" in a housing bill passed in July. Those powers include the Treasury lending money to Fannie and Freddie, as well as the option to buy stock. Frank added that he does know the details of the intervention.

Impact on home markets

If the banks that write mortgages to regular homebuyers can't count on Fannie and Freddie to buy their loans, they have to charge higher interest rates, tighten credit standards and demand higher downpayments - all of which is already happening and slowing a recovery in housing markets.

Even as the Fed has slashed short-term interest rates by more than 3 percentage points over the past year, rates for 30-year fixed-rate mortgages have remained stubbornly high. They were at 6.35% last week, Freddie Mac reported, down just a sliver from 6.46% last year.

Home prices fell 7.6% in the second quarter, the National Association of Realtors reported last month.

Any move to take Fannie and Freddie under explicit government control thus amounts to another effort to restore investor confidence at the companies, and in the housing market they support.

Cost to taxpayers

It's unclear what the long-term role of a conservatorship would be. The government would likely temporarily run Fannie and Freddie to ensure they don't take extreme risks to right themselves. The government would gradually add funds to the entities so they can continue to buy loans. And it would continue to implicitly back their liabilities.

The $5 trillion on Fannie's and Freddie's books would not be the cost to taxpayers because the vast majority of the loans would not default. Instead, the cost of the bailout would likely run into the tens of billions - but the range of potential losses is wide.

Few think the government wants to get in the business of running Fannie and Freddie for the long-term. Most think the institutions would need to be restructured so they are no longer both public and private entities: encouraged to take big risks so shareholders can profit while having an implicit government backing if their bets go horribly south. In short, they should not be "too big to fail."

While putting taxpayer money at risk to aid publicly owned companies is never desirable, many say the cost of not aiding the companies - given their central role in the mortgage market - could be worse.

Shaking up management

News reports indicate that the boards of directors and top executives at the companies - Daniel Mudd at Fannie and Richard Syron at Freddie Mac - will depart. Both executives have come under heavy fire over the past year as losses have mounted at their companies.

A CEO change at Fannie would come just a week after the board stood behind Mudd in a shakeup of the company's finance department, which saw the departure of finance chief Stephen Swad and two other high-ranking officers. Fannie Chairman Stephen Ashley said Aug. 27 that the board "is firmly committed to Dan Mudd."

Syron, who like Mudd has been criticized for his multimillion-dollar paychecks as his company's stock lost 90% of its value, has been looking for a successor since onetime President Eugene McQuade declined the CEO job last May. Syron has suggested at times that he wouldn't be averse to spending more time with his family.

"If I had better foresight, maybe I could have improved things a little bit," he said last month in response to a New York Times report on his handling of risks tied to the housing bust. "But frankly, if I had perfect foresight, I would never have taken this job in the first place."