GMAC Financial Services said on Tuesday that it expects to post a combined fourth-quarter loss of about $5 billion largely on charges related to the auto and home finance company's bid to write down or sell risky mortgage assets.

GMAC, one of the largest car loan makers in the United States, recently got a $3.8 billion cash injection from the U.S. government, the latest in a series of bailouts as the lender has struggled to recover from the housing crisis.

GMAC is taking a $3.8 billion pre-tax charge against fourth-quarter earnings, partially so it can write down the value of mortgage assets to a level where they may tempt outside investors.

Executives at the company told analysts in a conference call that they expected to now be able to sell some mortgages from Residential Capital, its struggling home loan arm, to third-party investors.

GMAC Chief Executive Michael Carpenter said the lender believed the recent moves had ringfenced, or contained, any potential risks going forward stemming from bad loans at Rescap.

(Reporting by Christian Plumb; editing by Gunna Dickson)