six months ended June 30, 2021 due to declines in bank stock market values, which were partially offset by increases of $74,000 in customer service fees and $51,000 in life insurance proceeds in the 2022 period.
Non-interest expense was $9.9 million during the six months ended June 30, 2022 compared to $9.5 million during the six months ended June 30, 2021, an increase of 4.6%. Most significantly impacting non-interest expense in the comparative six month periods was a $359,000 increase in employee compensation and benefits expense due to temporary duplication of compensation and benefits expense as a result of employee transitions, as well as increased medical claims expenses. Also contributing to the increase in non-interest expense was a $42,000 decline in the gain on other real estate owned during the six months ended June 30, 2022 versus the comparable 2021 period.
The income tax provision increased by $226,000 during the six months ended June 30, 2022, resulting from higher taxable income compared to the same period in 2021.
Financial Results for the Quarter
Annualized return on average assets for the three months ended June 30, 2022 was 0.97%, an increase of 14.1%, compared to 0.85% for the three months ended June 30, 2021. Annualized return on average equity for the three months ended June 30, 2022 was 15.53%, an increase of 62.8%, compared to 9.54% for the three months ended June 30, 2021.
Net interest income was $6.0 million for the three months ended June 30, 2022 compared to $5.2 million for the three months ended June 30, 2021. Average earning assets increased $25.6 million, or 3.3%, to $792.5 million during the three months ended June 30, 2022, compared to the same period in 2021, predominantly due to an increase of $39.5 million, or 12.2%, in average investment securities, partially offset by a decline of $7.2 million, or 1.7%, in average loans. The yield on earning assets increased 25 basis points, to 3.40%, during the three months ended June 30, 2022 compared to same period in 2021 partly due to the increase in market interest rates as both the prime rate and federal funds target range increased by 125 basis points, as well as from interest collected on a previously charged off nonaccrual loan. Over the same three month periods, the cost to fund interest earning assets with interest bearing liabilities decreased 11 basis points, to 0.48%, primarily due to a greater amount of higher-cost long-term debt present in the 2021 period. During the three months ended June 30, 2022, average interest bearing liabilities increased by $10.4 million, or 1.9%, compared to the comparable 2021 period, mainly due to growth in interest-bearing demand and savings deposits, partially offset by declines in time deposits and short-and long-term debt. The net interest margin, on a fully tax equivalent basis, increased from 2.76% during the three months ended June 30, 2021 to 3.08%, during the three months ended June 30, 2022.
Juniata recorded a loan loss provision expense of $222,000 in the three months ended June 30, 2022 compared to a provision credit of $200,000 in the comparable 2021 period. Loan growth, coupled with the continued uncertainty in the economic outlook due to inflation, labor shortages and supply chain disruptions, resulted in an increased loan loss provision, despite favorable asset quality trends and net recoveries during the three months ended June 30, 2022.
Non-interest income in the three months ended June 30, 2022 was $1.4 million compared to $1.3 million in the three months ended June 30, 2021, an increase of 6.1%. Most significantly impacting non-interest income in the comparative three month periods was a $1.1 million loss on sales and calls of securities during the three months ended June 30, 2022 which was offset by $1.2 million in gains from the termination of two derivatives contracts recorded in other non-interest income. The securities were sold, and the derivative contracts terminated, as part of a balance sheet and regulatory capital management strategy. Also affecting the change in non-interest income between the three months ended June 30, 2022 and 2021 was a $65,000 decline in the value of equity securities, which was partially offset by $51,000 in life insurance proceeds recorded in the 2022 period.
Non-interest expense was $5.0 million for the three months ended June 30, 2022, compared to $4.9 million for the three months ended June 30, 2021, an increase of 3.3%. Most significantly impacting non-interest expense in the comparative three month periods was a $151,000 increase in employee compensation expense during the three months ended June 30, 2022 due to temporary duplication of compensation expense as a result of employee transitions, which was partially offset by a $23,000 decline in data processing expense over the same periods.
An income tax provision of $177,000 was recorded in the three months ended June 30, 2022, compared to an income tax provision of $89,000 recorded during the three months ended June 30, 2021 predominantly due to higher taxable income recorded during the 2022 period.
Financial Condition
Total assets as of June 30, 2022 were $817.7 million, an increase of $7.1 million, or 0.9%, compared to total assets of $810.5 million at December 31, 2021. Over this period, outstanding loans and deposits increased by $22.8 million, or 5.4%, and $11.4 million, or 1.6%, respectively, while investment securities decreased by $31.8 million, or 9.5%. Operating cash flows, as well as the proceeds from the