Profit improved at M&T Bank in the third quarter as the Buffalo, N.Y., company expanded commercial and mortgage lending and completed the sale of a large investment-securities portfolio.

Net income at the $127 billion-asset company rose 4.5% to $327 million, or $2.10 per share, compared with the previous quarter. M&T's October 2015 acquisition Hudson City Bancorp skews year-over-year comparisons.

Net interest income after the loan-loss provision fell 2.5% to $811 million. The provision rose 47% to $47 million.

Commercial real estate loans rose 4.5% to $32.1 billion. Commercial and industrial loans rose 2.1% to $21.9 billion.

Noninterest income rose 9.6% to $491 million. Mortgage banking revenue rose 16% to $104 million.

M&T recorded an after-tax gain of $17 million on the sale of collateralized debt obligations, which increased earnings per share by 11 cents. Those investment securities were obtained from the Hudson City acquisition.

Noninterest expense rose 0.3% to $752 million on an increase in Federal Deposit Insurance Corp. assessments and higher advertising costs.