Freddie Mac, a top mortgage finance company the U.S. government is depending on to help stabilize the housing market, said on Wednesday it needs $30.8 billion from the Treasury to survive after a massive fourth-quarter loss.

The company, the second-largest provider of funding to the U.S. mortgage industry, recorded $7.2 billion in credit-related expenses, $7.5 billion in write-downs on securities and $13.3 billion of losses on derivative hedges, it said.

Freddie Mac is struggling to contain losses as the Obama administration is asking it and rival Fannie Mae to boost their support of the housing market. The U.S. recently doubled its capital commitment to Freddie Mac and Fannie Mae to $200 billion each, adding to a funding agreement made in September when the companies were forced into conservatorship.

Freddie Mac had warned that its regulator would likely ask for an additional $30 billion to $35 billion from the government, after a $14 billion injection last year.

(Reporting by Al Yoon; Editing by Dan Grebler)