First Midwest Bancorp (FMBI) offset insurance costs and the impact of shrinking margins with the sale of its stake in a software firm.

On Wednesday, First Midwest reported earnings of $28.9 million in the third quarter. The Itasca, Ill., company had lost $47.8 million loss in the third quarter of 2012, when it recorded heavy charges for bad loans.

Earnings per share of 39 cents beat the average estimate of analysts polled by Bloomberg by 24 cents.

First Midwest's net interest income fell 2%, to $65.7 million, because of a 20-basis-point contraction of its net interest margin, to 3.63%. The $8.4 billion-asset company's loan book rose 4%, to $5.4 billion.

First Midwest sold a $4 million investment in Textura Corp., which makes software for the construction industry, for $38.2 million, resulting in a $34.2 million gain. That gain nearly doubled noninterest income, to $58.1 million.

Fee-based revenues rose 14%, as wealth-management fees rose 11% to $6 million, card fees ticked up 5% to $5.5 million, and service charges were flat at $9.5 million. First Midwest also recorded a $7.8 million gain from the termination of two loan commitments with the Federal Home Loan Bank of Chicago.

Offsetting these gains, First Midwest recorded a $13.3 million writedown as it modified approximately $100 million of bank-owned life insurance policies.

The company made a $4.8 million provision for loan losses, compared with a $111.8 million provision in the third quarter of 2012, when it tried to resolve its problem assets. Net chargeoffs reached their lowest level in five years, $8.1 million, down from $125.5 million, the company said.

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.