The U.S. banking industry reported earnings of $40.3 billion during the first quarter of 2013, in part due to one-time changes in income and expenses at big banks, according to data released on Wednesday by the Federal Deposit Insurance Corp.

Bank earnings during the quarter were up 15.8% from the same period in 2012 and represented an all-time quarterly high, the FDIC said, though the previous high mark was when the industry was smaller in terms of total assets.

A reduction in expenses for legal costs and proceeds from a settlement boosted earnings during the quarter, the FDIC said.

Banks also reduced to a six-year low the amount they set aside in case of losses on loans, the FDIC said.

"We saw improvement in asset quality indicators over the quarter, a continued increase in the number of profitable institutions, and further declines in the number of problem banks and bank failures," FDIC Chairman Martin Gruenberg said in a statement.

"However, tighter net interest margins and slow loan growth create an incentive for institutions to reach for yield, which is a matter of ongoing supervisory attention."

Net operating revenue during the first quarter was $170.6 billion, up $2.7 billion, or 1.6 percent, from a year earlier, the FDIC said.

The number of problem banks fell during the quarter, and four FDIC-insured banks failed, the smallest number of failures since the second quarter of 2008, the agency said.