Interest income was $34.4 million for the three months ended September 30, 2024, an increase of $1.5 million, or 4%, from $32.9 million for the three months ended September 30, 2023. The increase in interest income was primarily due to the yield earned on the average balance of our interest-earning assets. The yield on the average balance of our loan portfolio increased 60 basis points primarily due to an 85 basis point increase in the yield on our residential real estate loans as the portfolio repriced higher in the higher interest rate environment. The yield on the average balance of our securities increased 106 basis points primarily due to the yield on our recently purchased securities being higher than the yield on the average balance of our securities for the three months ended September 30, 2023. Also contributing to the increase in interest income, the average balance of our securities portfolio of $476.5 million for the three months ended September 30, 2024 increased $75.7 million, or 19%, compared to the three months ended September 30, 2023, and the average balance of our other interest-earning assets, which predominately consists of cash held at the Federal Reserve Bank which earns interest at the federal funds rate less 10 basis points, of $650.1 million for the three months ended September 30, 2024 increased $60.8 million, or 10%, compared to the three months ended September 30, 2023. Partially offsetting the increase in interest income was the decline in interest income earned on our loans since the average balance of our loans decreased $204.1 million, or 14%.
Interest expense was $20.7 million for the three months ended September 30, 2024, an increase of $3.9 million, or 23%, from the three months ended September 30, 2023. Similar to our interest-earning assets, the increase in our interest expense was primarily driven by the change in interest rates. The rate paid on the average balance of interest-bearing deposits increased 84 basis points. We continued to competitively price our deposits in the higher interest rate environment and as competition for deposits significantly increased.
Net interest margin was 2.30% for the three months ended September 30, 2024, down 32 basis points from 2.62% for the three months ended September 30, 2023. The interest rate spread was 1.71% for the three months ended September 30, 2024, down 44 basis points from 2.15% for the three months ended September 30, 2023. Our net interest margin and interest rate spread were negatively impacted during the three months ended September 30, 2024 by higher interest rates paid on our interest-bearing deposits than in the comparable period in 2023, which outpaced the increase in the yield we earned on our interest-earning assets over the same period.
Nine Months Ended September 30, 2024 Compared to the Nine Months Ended September 30, 2023
Net interest income was $42.9 million for the nine months ended September 30, 2024, a decrease of $6.9 million, or 14%, from the nine months ended September 30, 2023. The decrease in net interest income primarily reflects interest expense on our interest-bearing deposits increasing more than interest income during this high interest rate environment.
Interest income was $101.5 million for the nine months ended September 30, 2024, an increase of $7.6 million, or 8%, compared to the nine months ended September 30, 2023. The increase in interest income was primarily due to a 58 basis point increase in the yield earned on the average balance of our total interest-earning assets with the rates on residential real estate loans, securities and other interest-earning assets increasing 99 basis points, 110 basis points and 33 basis points, respectively, as these portfolios repriced upward significantly in the higher interest rate environment. Also contributing to the increase in interest income, the average balance of our securities portfolio of $459.6 million for the nine months ended September 30, 2024 increased $78.7 million, or 21%, compared to the nine months ended September 30, 2023, and the average balance of our other interest-earning assets of $623.7 million for the nine months ended September 30, 2024 increased $108.7 million, or 21%, compared to the nine months ended September 30, 2023. Partially offsetting the increase in interest income was the decline in interest income earned on our loans since the average balance of our loans decreased $255.0 million, or 17%.
Interest expense was $58.6 million for the nine months ended September 30, 2024 compared to $44.0 million for the nine months ended September 30, 2023. Similar to our interest-bearing assets, the increase in our interest expense was primarily driven by the change in interest rates. The increase in interest expense was primarily due to an increase in the rate paid on our interest-bearing deposits of 120 basis points from the nine months ended September 30, 2023. Specifically, the average rate paid on money market, savings and NOW accounts, and time deposits increased 112 basis points and 131 basis points, respectively, compared to the nine months ended September 30, 2023, as we continued to competitively price our deposits. Interest expense for the nine ended September 30, 2024 also reflected the elimination of interest expense from our Subordinated Notes, which were redeemed in the third quarter of 2023 and totaled $3.7 million for the nine months ended September 30, 2023.
Net interest margin was 2.42% for the nine months ended September 30, 2024, down 31 basis points from 2.73% for the nine months ended September 30, 2023. The interest rate spread was 1.83% for the nine months ended September 30, 2024, down 44 basis points from 2.27% for the nine months ended September 30, 2023.