Shares of SunTrust,   (STI) - Get Report  , Georgia's biggest bank, surged more than 5% Thursday after the bank said it controlled costs and increased loans during the first quarter, even as investment-banking revenue slumped and losses grew in the beleaguered energy industry.   

The bank said earnings per share in the first quarter rose 8% from a year earlier to 84 cents, as revenue rose 5% to $2.1 billion. Atlanta-based SunTrust's net interest margin -- the difference between what it collects on loans and what it pays out on deposits -- rose by 0.21 percentage point to 3.04%.

It was "an all-around solid quarter in a tough environment," Peter J. Winter, an analyst at  CRT Sterne Agee, wrote in a note. He had estimated the bank would earn 75 cents a share. "The quarter reflected solid loan growth, margin expansion, good fee income and growth, overcoming market volatility in investment banking and mortgage."

TheStreet Recommends

Investment-banking income rose just 1%, reflecting a dearth of stock underwriting and mergers during a period when markets gyrated with speculation about the pace of  Federal Reserve rate increases and concerns that China's slowing economy could undermine global growth. 

Nonperforming loans climbed to 0.7% of the total, from 0.46% a year earlier, mainly because of the deterioration of creditworthiness for borrowers in the energy industry. 

Average loan balances during the quarter climbed 4% from a year earlier, SunTrust said in a statement. 

The bank showed improvement on cost controls, and executives' focus on the bottom line should help results in coming periods, Winter said. The lender's efficiency ratio -- a gauge of costs relative to revenue -- already is at 62.3%, implying wider operating margins than peers who average 64%, he said. Efficiency ratios tend to be higher in the first quarter compared with the rest of the year because of elevated personnel-related expenses, Winter said. 

Winter has a "neutral" rating on the shares and a price target of $43. On Friday, the stock climbed 5.2% to $41.96.