News of a profit for the first time in three years sent shares of Citizens Republic Bancorp Inc. soaring Friday.

The $9.5 billion-asset company in Flint, Mich., announced after the market closed on Thursday that it earned $18.5 million in the second quarter, compared to a net loss of $44.7 million a year earlier and a loss of $74.3 million in the first quarter.

The 46-cents-per-share profit was unexpected. Analyst polled by Thomson Reuters had predicted that the company would lose 23 cents per share on its way to its 13th-consecutive money-losing quarter.

At midday Friday Citizens Republic's shares were up nearly 8% from Thursday's close, to $9.15.

As with most companies that reported improved results in the second quarter, the profit was largely driven by lower credit costs. The company reported a provision for loan losses of $17.6 million, down 75% from a year earlier.

Nonperforming assets totaled $152.1 million, or 1.6% of total assets, down 68% from a year earlier and a 19% decrease from the previous quarter.

"Returning to profitability following 12 consecutive quarters of losses after the difficult work that we've done and the tireless dedication of our employees is a milestone for our company," said Cathleen Nash, president and chief executive of Citizens Republic, in a press release on Thursday. "These results are driven by our continued focus on pre-tax pre-provision profit and significantly improved credit trends resulting in a lower provision expense."

The results were also boosted by a $10.3 million income tax benefit, compared to an income tax expense of $3.7 million a year earlier.

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.