Ally Financial's second-quarter earnings swung to a profit from the previous year, boosted by returns from its auto lending business.

The $149.9 billion-asset company's income was $323 million, compared to a $927 million loss a year earlier. Adjusted earnings were 42 cents per share, nine cents higher than an estimate from analysts polled by Bloomberg.

Auto financing drove the earnings increase. Net auto income increased 21%, $461 million. The company attributed the increase to strong net financing revenue, particularly in leases. Consumer financing originations increased 11%, to $10.9 billion, from last year.

"Our core auto finance franchise had an outstanding quarter, posting the second highest level of consumer auto originations in Ally's history," Michael A. Carpenter, the company's chief executive, said in a Tuesday press release. "Helping to drive these results were two high-water marks for the business, with the most decisioned applications in a quarter and the highest volume of used originations on record."

Gains in auto sales offset a loss in the company's insurance business. The unit reported a second-quarter loss of $23 million, compared with a $45 million profit a year earlier, primarily due to severe hailstorms in the Midwest.

Income from mortgages was $27 million, compared to a loss of $27 million in the previous year. Ally's net interest margin climbed 59 basis points, to 2.63%

Retail deposits at Ally Bank increased 15%, to $45.9 billion.

Subscribe Now

Access to authoritative analysis and perspective and our data-driven report series.

14-Day Free Trial

No credit card required. Complete access to articles, breaking news and industry data.