Updated with comments from KBW analyst Christopher McGratty and Jefferies analyst Emlen Harmon, and market close information. NEW YORK ( TheStreet) -- Commerce Bancshares ( CBSH) on Thursday reported that its second-quarter net interest margin expanded to 3.55% from 3.45% the previous quarter, running counter to the trend for most banks in the prolonged low-rate environment. The Kansas City, Mo., lender reported second-quarter earnings of $74.3 million, or 84 cents share, beating by a wide margin the consensus estimate of a 72-cent profit, among analysts polled by Thomson Reuters. In comparison, the company earned $65.8 million, or 74 cents a share, during the first quarter and $69.0 million, or 75 cents a share, during the second quarter of 2011. The company's shares rose 2% to close at $39.28, while most other bank stocks showed declines. The KBW Bank Index ( I:BKX) declined over 1% to close at 44.46, with all 24 index components showing declines, except for Commerce Bancshares. Commerce had $20.7 billion in total assets as of June 30. Nonperforming assets, including non-accrual loans and repossessed real estate, declined to a strong 0.88% of total assets as of June 30, improving from 0.95% the previous quarter, and 1.12% a year earlier. Second-quarter net interest income increased to $165.1 million from $159.7 million in the first quarter, and $164.7 million in the second quarter of 2011. The improved second-quarter interest income included "interest income of $1.3 million on two non-performing commercial loans," and "interest income of $1.1 million on the early pay-off of a commercial real estate loan," according to the company. Together, these two items contributed four cents to the second-quarter bottom line. Another major factor in Commerce's increase in net interest income -- and the widened net interest margin -- was "an increase in inflation income of $4.4 million on the Company's inflation protected securities (TIPs), which increased the yield on the overall securities portfolio by 20 basis points to 2.75%," while increasing interest income on the company's $9 billion securities portfolio by $4 million over the previous quarter. While Commerce's average loans during the second quarter increased slightly from the second quarter and declined slightly from a year earlier, period-end total loans grew 1% sequentially and 2% year-over-year, as new lending activity accelerated toward the end of the second quarter, with "growth of $165.1 million in business, personal real estate loans and consumer loans," according to CEO David Kemper. While the company's total non-interest income declined slightly year-over-year to $100.8 million during the second quarter, Commerce managed to offset most of the 44.5% decline in debit card interchange fees -- from the Durbin Amendment to the Dodd-Frank bank reform legislation, which cut the fees charged by large banks to merchants to process debit card purchases starting in the fourth quarter of 2011 -- with "an increase in corporate card and trust fees." Second-quarter bank card transaction fee income totaled $38.4 million, increasing from $34.7 million in the first quarter, while declining from $41.3 million in the second quarter of 2011. Trust fee income grew to $23.8 million in the second quarter, from $22.8 million the previous quarter, and $22.5 million, a year earlier.