DETROIT — Auto financing and banking company Ally Financial took a big step toward exiting US government ownership Tuesday, announcing a deal to pay taxpayers $5.2 billion for preferred stock granted in a 2009 bailout during the financial crisis.
Ally, the former financing arm of General Motors Co., had to be rescued when the economy and auto industry nosedived, with the government spending $17.2 billion to save the company and keep auto loans coming.
Under the deal, Ally also will pay the government accrued dividends plus $725 million for the Treasury Department’s right to acquire additional common stock shares. With the move, Ally will have repaid roughly $12 billion, meaning the government is still about $5.2 billion in the hole on the Ally deal.
In addition to the preferred stock, taxpayers also own 74 percent of Ally’s common stock. There’s hope that taxpayers will get the rest of their money back when the stock is sold, potentially in a public offering.
Ally spokeswoman Gina Proia gave no further details of when an IPO or other stock sale might take place but said it is still an option. Ally filed paperwork for an IPO in 2011 but delayed the sale until its finances and the market for such offerings improved.
‘‘Ally has made great progress in restructuring and strengthening its business in order to repay the taxpayer, and we look forward to continuing to work with the company to recover the remaining investment,’’ said Tim Massad, assistant treasury secretary for financial stability.
The deal, reached on Monday and disclosed Tuesday in a filing with the Securities and Exchange Commission, still must be approved by the Federal Reserve, which must bless the capital strength of Ally’s banking unit.
In addition, Ally said it would sell nearly 167,000 common shares to unspecified investors for $1 billion in a private deal to take place no later than Nov. 30.
‘‘These transactions are key steps in Ally’s journey toward repaying the remaining investment by the US taxpayer,’’ said Ally chief executive Michael Carpenter. ‘‘We are encouraged by the strong investor interest in the company through the process to raise the additional common equity, and believe it validates the progress that has been made over recent years.’’
The private sale of common shares will dilute the government’s stake in Ally from the current 74 percent to around 65 percent, Proia said. Other Ally shareholders include private equity firm Cerberus Capital Management at 9 percent, a trust for General Motors at 10 percent, and some smaller investors.
Ally has been preparing to repay the government for the past year, amassing cash by selling assets outside the United States.
In November, GM Financial, General Motors’ new financial arm, bought Ally’s European, Chinese, and Latin American auto financing operations for $4.25 billion. A month before that, Ally sold its Canadian operations to the Royal Bank of Canada for $4.1 billion and a Mexican insurance business for $865 million, giving it about $9 billion in cash.
In May, Ally cut ties to its mortgage lending and servicing subsidiary Residential Capital LLC, or ResCap, when the subsidiary filed for bankruptcy protection.
Toxic mortgages made by ResCap caused most of Ally’s financial problems. ResCap has since accepted a $3 billion buyout offer from a unit of Ocwen Financial Corp.
Also in the SEC filing are details of who would appoint members to Ally’s board of directors as stock changes hands. The government, which now appoints six of 11 directors, will gradually lose seats as it divests itself of Ally shares.
Proia and Treasury Department spokesman Adam Hodge wouldn’t comment on whether the government plans a gradual sale of the shares instead of an IPO.
‘‘The IPO continues to be a viable option,’’ Proia said. ‘‘We can’t comment any further at this point.’’