M&T Bank ( MTB) rose modestly Thursday after posting a better-than-expected second quarter. While M&T's quarterly profit of $214 million was flat compared to a year earlier, earnings of $1.95 a share beat analysts' expectations of $1.85. Revenue, excluding a provision for credit losses, rose 5% to $745 million, beating analysts' estimates of $717 million. "In contrast to the first quarter, M&T experienced a 3-basis-point improvement in our net interest margin and growth in several noninterest income categories, including mortgage banking revenues that were consistent with our historical performance. In addition to revenue growth, operating expenses continued to be well controlled," said M&T's CFO Rene F. Jones. The company said its net interest margin -- the profit it makes on taking deposits and lending them out again -- rose 1 basis point from a year earlier and 3 basis points from the first quarter to 3.67%. In the first three months of the year, M&T earnings were hit hard by the troubled mortgage market, particularly in the so-called Alt-A mortgage business -- mortgages made to consumers with imperfect credit histories or without full documentation. The company lowered earnings guidance for the first quarter after it reduced the value of its Alt-A portfolio and said the demand for repurchase activity for previously sold Alt-A mortgages was increasing.