The Treasury Department is putting the finishing touches to a plan designed to shore up Fannie Mae and Freddie Mac, people familiar with the matter told the Wall Street Journal, a move that would essentially amount to a government takeover of the mortgage giants.

The plan is expected to involve putting the two companies into the conservatorship of their regulator, the Federal Housing Finance Agency, said several people familiar with the matter. That would mean the government would take the reins of the companies, at least temporarily.

It is also expected to involve the government injecting capital into Fannie and Freddie. That could happen gradually on a quarter-by-quarter basis, rather than in a single move, one person familiar with the matter said.

An announcement could come as early as this weekend. Some details are still being worked out, which means terms of the arrangement could change.

Any move by Treasury would represent perhaps the most significant intervention by the government in the financial industry since the housing bust touched off turmoil in the credit markets a little more than a year ago. From the $168 billion economic-stimulus package in February through the bailout of investment bank Bear Stearns Cos., the Bush administration and the Federal Reserve have taken an increasingly aggressive stance in responding to what has become one of the worst financial crises in decades.

Fannie and Freddie are vital cogs in the U.S. housing market, and their woes mark a remarkable comedown for two of Washington's most powerful and feared institutions, known for their financial clout and no-holds-barred lobbying prowess.

Click here for more from the Wall Street Journal.