a $204,000, or 19.3%, increase in interest on loans, a $43,000, or 177.1%, increase in interest on investment securities and a $106,000, or 1,091%, increase in interest on interest-bearing deposits and other assets.
The average balance of loans increased by $5.6 million, or 4.9%, during the three months ended March 31, 2023 over the average balance for the three months ended March 31, 2022, while the average yield on loans increased by 51 basis points to 4.23% for the three months ended March 31, 2023 from 3.72% for the three months ended March 31, 2022. The increase in average yield on loans was due to the overall increase in interest rates in the economy.
The average balance of investment securities increased $4.8 million to $14.4 million for the three months ended March 31, 2023 from $9.6 million for the three months ended March 31, 2022, while the average yield on investment securities increased by 85 basis points to 1.89% for the three months ended March 31, 2023 from 1.04% for the three months ended March 31, 2022. The increase in average yields on securities was due primarily to the increasing interest rate environment.
The average balance of other interest-bearing deposits, comprised primarily of certificates of deposit in other financial institutions, overnight deposits and stock in the Federal Home Loan Bank, decreased $13.4 million, or 57.2%, for the three months ended March 31, 2023, compared to the same period in 2022, which was partially offset by an increase in the average yield of 445 basis points, to 4.62% for the three months ended March 31, 2023 from 0.17% for the three months ended March 31, 2022. The average yield on short-term deposits reflected the increases in interest rates in the economy.
Interest Expense. Total interest expense increased $50,000, or 73.9%, to $118,000 for the three months ended March 31, 2023 from $68,000 for the three months ended March 31, 2022. Interest expense on deposits increased $52,000, or 88.2%, to $111,000 for the three months ended March 31, 2023, from $59,000 for the three months ended March 31, 2022. The increase was primarily due to an increase of 19 basis points in the average cost of interest-bearing deposits to 0.39% for the three months ended March 31, 2023 from 0.20% for the three months ended March 31, 2022, partially offset by a decrease of $4.0 million, or 3.3%, in the average balance of interest-bearing deposits to $115.1 million for the three months ended March 31, 2023 from $119.0 million the three months ended March 31, 2022.
Interest expense on borrowings decreased $1,800, or 20.6%, for the three months ended March 31, 2023, compared to the three months ended March 31, 2022. The decrease was due to a $1.0 million decrease in the average balance outstanding, to $2.8 million for the three months ended March 31, 2023 from $3.8 million for the same period in 2022, which was partially offset by a six basis point increase in the weighted-average rate to 1.02% for the three months ended March 31, 2023.
Net Interest Income. Net interest income increased $303,000, or 29.7%, to $1.3 million for the three months ended March 31, 2023, compared to $1.0 million for the three months ended March 31, 2022. The increase reflected an increase in the interest rate spread to 3.62% for the three months ended March 31, 2023 from 2.74% for the three months ended March 31, 2022 and an increase in average net interest earning assets of $2.0 million period to period. The net interest margin increased to 3.70% for the three months ended March 31, 2023 from 2.79% for the three months ended March 31, 2022. The interest rate spread and net interest margin were impacted by increasing market interest rates during 2022.
Provision for Loan Losses. Based on an analysis of the factors described in “Critical Accounting Policies—Allowance for Loan Losses,” management concluded that a provision for loan losses was not required for the three months ended March 31, 2023, a decrease of $10,000 compared to the three months ended March 31, 2022. The allowance for loan losses was $961,000 and $983,000 at March 31, 2023 and 2022, respectively, and represented 0.81% of total loans at March 31, 2023, and 0.85% of total loans at March 31, 2022. The determination of the adequacy of the allowance for loan losses was due primarily to the low balances of nonperforming loans, delinquent loans and net charge-offs in both periods.
Total nonperforming loans were $588,000 at March 31, 2023, compared to $199,000 at March 31, 2022. Classified loans totaled $588,000 at March 31, 2023, compared to $249,000 at March 31, 2022, and total loans past due