deposits, as well as higher rates on borrowings. The interest rate spread of 2.58% for the three months ended March 31, 2024 decreased 18 basis points compared to 2.76% for the three months ended March 31, 2023.
Our net interest margin decreased 13 basis points, to 3.14%, for the three months ended March 31, 2024 compared to 3.27% for the three months ended March 31, 2023.
Interest Income. Interest income of $314.2 million for the three months ended March 31, 2024 increased $102.9 million, or 49%, compared with $211.3 million for the three months ended March 31, 2023. This increase reflected an increase in both average balances and yields of loans and loans held for sale, as well as securities available for sale and held to maturity. The higher yields were in response to higher interest rates set by the Federal Reserve.
Interest income of $272.0 million for the three months ended March 31, 2024 for loans and loans held for sale increased $82.5 million, or 44%, compared to the three months ended March 31, 2023. The average balance of loans, including loans held for sale, of $13.5 billion increased $2.9 billion, or 27%, compared $10.6 billion for the three months ended March 31, 2023. The average yield on loans increased 86 basis points to 8.11%, for the three months ended March 31, 2024, compared to 7.25% for the three months ended March 31, 2023. The increase in average balances of loans and loans held for sale was primarily due to increases in warehouse, multi-family, and healthcare loans, as well as loans held for sale, during the period.
Interest income of $14.4 million for the three months ended March 31, 2024 on securities available for sale increased $12.1 million, or 535%, compared to the three months ended March 31, 2023. The average balance of securities available for sale of $1.1 billion increased $639.5 million, or 144%, compared to $445.6 million for the three months ended March 31, 2023. The average yield increased 327 basis points to 5.33%, for the three months ended March 31, 2024 compared to 2.06% for the three months ended March 31, 2023. The increase in average balances of securities available for sale was primarily associated with the acquisition of certain securities in from a warehouse customer in December 2023 that provide protective put options and interest rate floor derivatives to prevent losses in value.
Interest income of $20.5 million for the three months ended March 31, 2024 for securities held to maturity increased $4.8 million, or 30%, compared to the three months ended March 31, 2023. The average balance of securities held for maturity of $1.2 billion increased $81.4 million, or 7%, compared to $1.1 billion for the three months ended March 31, 2023. The average yield increased 117 basis points 6.90% for the three months ended March 31, 2024 compared to 5.73% for the three months ended March 31, 2023. The increase in average balance of securities held to maturity was primarily related to held to maturity securities acquired as part of loan securitizations.
Interest income of $5.5 million for the three months ended March 31, 2024 on interest-bearing deposits and other increased $3.4 million, or 155%, compared to the three months ended March 31, 2023. The average balance of interest-earning deposits and other of $346.2 million increased $161.7 million, or 88%, compared to $184.5 million for the three months ended March 31, 2023. The average yield increased 166 basis points to 6.44%, for the three months ended March 31, 2024 compared to 4.78% for the three months ended March 31, 2023.
Interest Expense. Total interest expense of $187.1 for the three months ended March 31, 2024 increased $76.5 million, or 69%, compared with $110.6 million for the three months ended March 31, 2023.
Interest expense on deposits increased $66.6 million, or 64%, to $171.0 million for the three months ended March 31, 2024, from $104.4 million for the three months ended March 31, 2023. The increase was primarily due to higher rates average balances and rates on certificates of deposit and interest-bearing checking, as well as higher rates on borrowings.
Interest expense of $76.5 million for the three months ended March 31, 2024 for certificate of deposit accounts increased $41.5 million, or 119%, compared to $34.9 million for the three months ended March 31, 2023. The average balance of certificates of deposits was $5.7 billion for the three months ended March 31, 2024, which increased $2.4 billion, or 71%, compared to the three months ended March 31, 2023. The average interest rate on certificates of deposits