Net interest margin decreased 26 basis points to 3.45% in the second quarter of 2011 from our margin of 3.71% in the prior year second quarter due primarily to lower average earning assets and a 21 basis point decline in net interest spread. The yield on earning assets declined 65 basis points from the 2010 second quarter, compared with a 44 basis point decline in rates paid on interest-bearing liabilities. Net interest margin decreased 9 basis points to 3.45% from our margin of 3.54% in the first quarter of 2011, due primarily to a lower yield on earning assets. The yield on earning assets declined 12 basis points from the first quarter of 2011 compared with a 4 basis point decline in rates paid on interest-bearing liabilities. Interest foregone on nonaccrual loans was $1.1 million and $1.8 million for the second quarter and first six months of 2011, respectively.
Average earning assets declined 1.6% to $1.58 billion for the three months ended June 30, 2011, compared with $1.61 billion for the three months ended June 30, 2010. The decline in average earnings assets was primarily due to a 6.5% decrease in average loans to $1.27 billion for the 2011 second quarter from $1.36 billion in the 2010 second quarter.
Average deposits increased 1.2% to $1.47 billion, up from $1.46 billion for the three months ended June 30, 2010.
Non-Interest IncomeNon-interest income for the second quarter of 2011 increased 91.4%, or $1.4 million, to $2.87 million compared with $1.50 million in the second quarter of 2010. The increase in non-interest income was due to increased gains on sales of securities and loans originated for sale, partially offset by lower service charges on deposit accounts. During the quarter, certain securities were liquidated and replaced in an effort to reduce market value volatility at a modestly reduced yield going forward. In addition, we recorded an other than temporary impairment charge totaling $465,000 in the 2010 second quarter. There was no comparable charge in the second quarter of 2011.