insurance proceeds of $195,000 and an increase in various other non-interest income items of $224,000 also served to reduce the overall decline in non-interest income.
For the fourth quarter of 2021, non-interest expense totaled $9.5 million, an increase of $976,000, or 11.4%, over the comparable 2020 period. The increase was primarily due to an increase in salaries and benefits of $869,000, or 19.3%, as the Company hired additional employees for its new branches and responded to the competitive pressures of the local job market. For the three months ended December 31, 2021, occupancy expenses increased $140,000, or 15.0%, as a result of the additional rent, depreciation and other expenses related to the branch expansion. The addition of branches was also primarily responsible for increased marketing fees of $169,000 and increased data processing costs of $116,000. These increases were partially offset by decreased professional fees of $126,000 and a decrease in other non-interest expenses of $178,000, or 10.2%. For the year ended December 31, 2021, non-interest expense increased $5.4 million, or 18.1%, to $35.5 million from $30.1 million for the comparative period in 2020. The increase was primarily due to an increase in salaries and benefits of $3.3 million, or 19.7%, due to new branch employees as well as annual merit increases, production incentives and employee benefit increases. Occupancy expense increased $579,000, or 16.3%, data processing expense increased $345,000, or 24.7%, marketing fees increased $202,000 and professional fees increased $194,000 in 2021, all of which were due to the branch expansion during the year. Other non-interest expenses increased $935,000, or 18.1%, and included an additional reserve of $600,000 for potential consumer compliance issues in the Bank’s indirect automobile portfolio. Additional reserves in the future may be required but cannot be estimated at this time.
Balance Sheet Analysis
Total assets were $1.28 billion at December 31, 2021, representing an increase of $152.3 million, or 13.5%, from $1.13 billion at December 31, 2020. Available for sale securities increased $177.4 million, or 172.3%, primarily due to $244.7 million of new purchases as we deployed excess cash received mostly from PPP borrower-related accounts, government stimulus actions and the additional deposits acquired in the branch acquisitions. The increase in available for sale securities was partially offset by paydowns, calls and maturities of $62.6 million and $4.7 million in unrealized market losses. Net loans decreased $18.8 million, or 2.2%, primarily due to a decrease in PPP loans, which were partially offset by production increases in new multi-family real estate. Cash and due from banks decreased $21.4 million, or 22.9%, primarily due to a decrease in deposits held at the Federal Reserve Bank of New York. The cash surrender value of life insurance increased $10.3 million, as the Bank purchased $10.0 million in split-dollar life insurance policies for key employees in the second quarter of 2021.
Past due loans decreased $4.5 million, or 25.1%, between December 31, 2020 and December 31, 2021, finishing at $13.5 million, or 1.6% of total loans, down from $18.0 million, or 2.1% of total loans at year-end 2020. Past due loan balances have been positively impacted by the economic stimulus received by customers along with a recovering economy. Our allowance for loan losses as a percentage of total gross loans was 0.89% at December 31, 2021 as compared to 1.33% at December 31, 2020.
Total liabilities increased $142.9 million, or 14.1%, to $1.16 billion at December 31, 2021, primarily due to an increase in deposits of $172.6 million. This increase was due to the acquisition of $33.9 million in deposits from ConnectOne Bank, an accumulation of liquidity by customers in response to government stimulus actions and normal fluctuations in some of our large business accounts. A decrease of $32.6 million in Federal Home Loan Bank advances partially offset the increase in liabilities.
Stockholders' equity increased $9.5 million, or 8.1%, to $126.0 million at December 31, 2021, primarily due to net income of $11.6 million, partially offset by a $3.7 million increase in accumulated other comprehensive loss on available for sale securities, as a net unrealized gain turned to a net unrealized loss. The Company's ratio of average equity to average assets was 10.02% for the year ended December 31, 2021 and 10.56% for the year ended December 31, 2020.