to this improvement was a $1.1 million other-than-temporary impairment charge on securities recorded in the fourth quarter of 2011 on two private label collateralized mortgage obligation (“CMO”) bonds. The Company no longer owns these bonds and does not own any other private label CMOs.
The Company recorded a net loss of $1.7 million for the full year ended December 31, 2012 versus a net loss of $78 thousand in 2011. The increased loss resulted from several factors, most notably the significant non-recurring charges associated with the bulk sale of loans in connection with resolving the Company’s legacy credit issues. Other factors included a $12.8 million reduction in net interest income coupled with a $2.5 million increase in operating expenses in 2012. Partially offsetting these negative factors was a $16.4 million reduction in the provision for loan losses and a $760 thousand improvement in non-interest income in 2012.
The decline in net interest income versus 2011 resulted from a 78 basis point narrowing of the Company’s net interest margin to 4.19% and a $31 million reduction in average interest-earning assets in 2012. The margin contraction was primarily due to a 92 basis point decline in the average yield on interest-earning assets in 2012 resulting from a 52 basis point contraction in the average loan portfolio yield. A shift in the Company’s average interest-earning asset mix from loans (down $153 million) and investment securities (down $28 million) into lower yielding overnight investments (up $152 million) also contributed to the margin contraction in 2012. The Company’s cost of average interest-bearing liabilities declined by 20 basis points in 2012 to 46 basis points from 66 basis points a year ago and the total cost of funds declined by 15 basis points to 27 basis points in 2012 from 42 basis points in 2011.
The $16.4 million reduction in the 2012 full year provision for loan losses resulted from the significant improvement in the level of criticized and classified assets during 2012. Growth in staff and other operating expenses, primarily $1.9 million associated with the bulk sale of non-performing assets, were the primary drivers of the $2.5 million increase in operating expenses in 2012 versus 2011. The improvement in non-interest income was due to a $1.5 million increase in net gains on the sale of loans in 2012 along with the impact of a $1.1 million other-than-temporary impairment charge on two CMOs recorded in 2011. Somewhat offsetting these positive factors was a $1.9 million decline in net gains on the sale of securities available for sale in 2012.
Commenting on the fourth quarter results, President and CEO Howard C. Bluver stated, “I am very pleased with our results in the fourth quarter and believe we enter 2013 in a position of strength and with real momentum. As I indicated when I was appointed CEO one year ago, 2012 would be dedicated to cleaning up the legacy credit issues, transforming our balance sheet and putting in place the people and processes needed to turn around the Company for future growth. I believe we have executed on each of these priorities in 2012, and did so ahead of schedule.
We ended 2012 with non-performing loans of $16 million, or 2.10% of total loans, compared to $81 million, or 8.33% of total loans, at the end of 2011. Further, we expect the non-performing loans that remain to be positively resolved over time through a combination of strong collateral values, ongoing workout agreements with borrowers, expected payoffs in full and future upgrades to performing status. Similarly, early stage delinquencies (30-89 days), often a potential harbinger of future credit problems, were substantially reduced throughout the year to $14 million, or 1.81% of total loans at the end of 2012, compared to $35 million, or 3.56% of total loans, at the end of 2011. We also end the year well reserved, with an allowance for loan losses as a percentage of total loans of 2.28%, against a loan portfolio that reflects substantially less risk than it did a year ago.
Our capital position reflects similar strength. Because we resolved our legacy credit issues on financial terms better than we originally assumed and successfully completed a $25 million private placement of common stock during the year, we end 2012 with a Tier I leverage ratio of 9.79% and a total risk based capital ratio of 18.15%. This strong capital position is an important component that lets us turn all our efforts to growth as we look forward.
The liability side of our balance sheet reflects a similar story. We continue to benefit from one of the most attractive and stable core deposit franchises in the community banking space, with thousands of long term, loyal customers reflecting our 123-year history on Long Island. We ended 2012 with demand deposits of $615 million, or 43% of total deposits, compared to $525 million, or 40% of total deposits, at the end of 2011. This resulted in ongoing reductions in total funding costs throughout 2012, to a remarkably low 24 basis points in the fourth quarter of the year. With no debt, negligible brokered deposits, and a strong liquidity position, our funding position is a core strength of the Company.
Looking forward into 2013, we are cautiously optimistic. Our management team has worked hard throughout 2012 to put the Company in a position to focus on future growth and we have started to see the results of that work.
Under Mike Orsino, our new Chief Lending Officer, our commercial lending business has been completely reorganized and transformed, strong team leaders and relationship managers have been recruited, and our new loan production office in Melville is up and running with two new lending teams focused on western Suffolk and Nassau Counties. We are beginning to see the results of