General Motors was a deeply troubled company in 2008.
Eh. Make that deeply, deeply, deeply troubled.
So was its finance arm, GMAC, which had plunged head-first into subprime mortgage lending, in addition to automotive lending. That left the company awash in billions of dollars worth of bad mortgages.
The federal government had to figure out a way to bail out both companies - because GM wouldn't survive if it didn't have a place to send customers for car loans, and if its dealers didn't have a place to get financing to buy the inventory.
So, GMAC was severed from GM, and the U.S. Treasury gave the division, renamed Ally Bank, $17-billion to keep it afloat.
Ally continued to provide dealer financing and car loans to GM customers (as well as Chrysler dealers and customers, after Chrysler Financial was dissolved).
But Ally just wasn't the same as a captive lender, according to Michelle Krebs, an analyst with Edmunds.com.
For one thing, Ally Bank didn't want much to do with sub-prime car loans.
And other outside banks also weren't at the beck and call of GM and Chrysler. The lenders got to call the shots on who got a loan and who didn't to buy a GM or Chrysler car.
"The problem with that is a lot of those financial institutions kind of go in and out of automotive (loans)," says Kreb, "depending on the (economic) environment. So the car companies need that reliable kind of entity that is always ready to fund auto loans."
GM began rebuilding its captive finance arm as soon as it could. In 2010, the company bought Americredit, renaming it GM Financial.
And by the middle of next year, GM plans to purchase the international finance divisions from its former captive lending arm.
The Detroit automaker will pay Ally Bank more than $4-billion for its international automotive financing operations. That will allow GM to provide loans to customers in Latin America, Europe, and China.
Krebs says car loans are an increasingly accepted form of buying vehicles around the world now.
"We are seeing these big emerging markets -- Brazil and China -- now adopt some of the U.S. ways of credit, that goes back decades, that's what kind of built the U.S. auto industry."
The transaction likely means Ally Bank will be able to fully repay its outstanding debt to the U.S. Treasury by the end of the year - the debt, that is, that wasn't forgiven and converted to stock.
The federal government still owns about three-quarters of Ally, and it's expected that there will eventually be an initial public offering - or Ally is going to have to generate enough cash to buy the stock back.
However, it doesn't seem that Ally is paying the same price as GM for being partially government owned. Maybe the name change helped.
GM still suffers from the hated "Government Motors," nickname, even though the Treasury shed about half its ownership interest in the company in an IPO in late 2010.
One could argue that GM should get some credit for helping Ally repay the government, by buying its international lending operations.
But it probably won't.
Meanwhile, Chrysler, while still sending customers to Ally for loans, has returned to sub-prime car lending at a faster pace than many automakers.
The automaker struck a deal with Santander Bank to provide car loans for customers with less than stellar credit.
Experts say subprime car loans don't run the same risk as subprime home loans. The amount financed is, of course, much less - and the default rate is also much lower.