Interest Expense. Interest expense on interest bearing liabilities increased $3.4 million, or 70.6%, to $8.3 million for the third quarter of 2022, compared to $4.8 million for the third quarter of 2021. The cost of interest bearing liabilities increased 42 basis points from 0.88% in the third quarter of 2021 to 1.30% in the third quarter of 2022, primarily due to higher rates paid on deposits and increased utilization of federal funds purchased and FHLB advances in the rising interest rate environment.
Interest expense on deposits was $6.0 million for the third quarter of 2022, an increase of $2.6 million, or 75.1%, from $3.4 million for the third quarter of 2021. The cost of total deposits increased 25 basis points from 0.48% in the third quarter of 2021, to 0.73% in the third quarter of 2022, primarily due to the upward repricing of the deposit portfolio in the higher interest rate environment.
Interest expense on borrowings increased $853,000 to $2.3 million for the third quarter of 2022, compared to $1.4 million for the third quarter of 2021. This increase was primarily due to higher average balances of federal funds purchased and FHLB advances.
Nine Months Ended September 30, 2022 Compared to Nine Months Ended September 30, 2021
Net interest income was $96.8 million for the nine months ended September 30, 2022, an increase of $16.4 million, or 20.5%, compared to $80.4 million for the nine months ended September 30, 2021. The increase in net interest income was primarily due to growth in average interest earning assets, offset partially by lower PPP fee recognition and higher average balances of deposits and federal funds purchased.
Net interest margin (on a fully tax-equivalent basis) for the nine months ended September 30, 2022 was 3.57%, compared to 3.55% for the nine months ended September 30, 2021, an increase of two basis points. Core net interest margin (on a fully tax-equivalent basis), a non-GAAP financial measure which excludes the impact of loan fees and PPP balances, interest, and fees, for the nine months ended September 30, 2022 was 3.35%, a six basis point increase from 3.29% for the nine months ended September 30, 2021.
Average interest earning assets for the nine months ended September 30, 2022 increased $612.9 million, or 20.1%, to $3.66 billion from $3.05 billion for the nine months ended September 30, 2021. This increase in average interest earning assets was primarily due to strong organic growth in the loan portfolio and continued purchases of investment securities, offset partially by the forgiveness of PPP loans and the reduction of cash balances. Average interest bearing liabilities increased $350.4 million, or 17.0%, to $2.42 billion for the nine months ended September 30, 2022, from $2.07 billion for the nine months ended September 30, 2021. The increase in average interest bearing liabilities was primarily due to an increase in interest bearing, nonmaturity deposits and federal funds purchased, offset partially by a decrease in time deposits.
Average interest earning assets produced a tax-equivalent yield of 4.23% for the nine months ended September 30, 2022, compared to 4.20% for the nine months ended September 30, 2021. The average rate paid on interest bearing liabilities was 1.00% for the nine months ended September 30, 2022, compared to 0.95% for the nine months ended September 30, 2021.
Interest Income. Total interest income on a tax-equivalent basis was $115.7 million for the nine months ended September 30, 2022, compared to $95.7 million for the nine months ended September 30, 2021. The $20.0 million, or 20.8%, increase in total interest income on a tax-equivalent basis was primarily due to strong organic growth in the loan portfolio and continued purchases of investment securities, offset partially by a reduction in the recognition of PPP origination fees as the PPP loan portfolio has almost fully paid off.
Interest income on the investment securities portfolio, on a fully-tax equivalent basis, increased $3.5 million, or 45.9%, during the nine months ended September 30, 2022, compared to the nine months ended September 30, 2021, primarily due to a $104.7 million, or 27.1%, increase in average balances between the periods.
Interest income on loans, on a fully-tax equivalent basis, for the nine months ended September 30, 2022 was $104.1 million, compared to $87.8 million for the nine months ended September 30, 2021. The $16.3 million, or 18.6%,