Mortgage giant Freddie Mac — emboldened by emergency regulatory actions that have triggered a two-day rebound in its battered stock — is considering raising capital by selling as much as $10 billion in new shares to investors, according to people familiar with the matter.

The high-stakes maneuver would have the potential to avoid a full-blown government rescue for Freddie Mac and Fannie Mae, twin keystones of the U.S. housing market. The publicly traded, government-sponsored companies own or guarantee about $5.2 trillion of home mortgages, or nearly half the total outstanding, and are at the center of government efforts to prop up the sagging housing market.

Both companies' stock fell about 45% last week amid worry about whether they have enough capital to cover mortgage losses. The depth of their troubles spurred the Treasury Department on Sunday to unveil an unusual plan to temporarily extend an unspecified credit line to both companies — as well as buy stock in them if necessary.

That plan quickly came under fire on Capitol Hill. Critics argue it could cost American taxpayers billions of dollars.

For its part, Freddie would like to avoid the stricter government oversight that could accompany any rescue. Its moves come as new details emerge about its recent stumbles.

The past two days have raised hopes at Freddie for a sale of shares to investors other than the Treasury. Freddie and Fannie shares both surged more than 29% on Wednesday, a day after the Securities and Exchange Commission set emergency rules limiting the ability of bearish investors to place aggressive bets that their stocks would keep falling.

On Thursday, Freddie shares were up another 22%, though they remain down 76% for the year.

A sale by Freddie of common and preferred stock could be tough to pull off. For starters, the preferred shares would require Freddie to offer a very high rate of return to attract buyers. The yield on one existing issue of Freddie's preferred stock, for example, is about 13.8%.

Click to read more from The Wall Street Journal