owned $685.2 million and $705.9 million, respectively, of mortgage-backed securities issued by Freddie Mac, Fannie Mae, and Ginnie Mae. We did not record a provision for credit losses on investment securities during the six months ended June 30, 2024 or 2023 as all our securities were issued either by U.S. government agencies or U.S. government-sponsored enterprises.
Critical Accounting Policies
There are no material changes to the critical accounting policies disclosed in Territorial Bancorp Inc.’s Annual Report on Form 10-K for the year ended December 31, 2023.
Comparison of Financial Condition at June 30, 2024 and December 31, 2023
Assets. At June 30, 2024, our total assets were $2.2 billion, a decrease of $71.3 million, or 3.2%, from December 31, 2023. The decrease in assets was primarily due to a $43.9 million decrease in cash and cash equivalents, a $20.7 million decrease in total investment securities, and a $7.2 million decrease in total loans.
Cash and Cash Equivalents. Cash and cash equivalents were $82.8 million at June 30, 2024, a decrease of $43.9 million, or 34.6%, since December 31, 2023. The decrease in cash and cash equivalents was primarily caused by a $63.9 million decrease in deposits which was partially offset by a $20.7 million decrease in total investment securities, which is described below.
Loans. Total loans were $1.3 billion at June 30, 2024, or 59.9% of total assets. During the six months ended June 30, 2024, the loan portfolio decreased by $7.2 million, or 0.6%. The decrease in the loan portfolio primarily occurred as principal repayments exceeded the origination of new loans.
Securities. Total investment securities, including $19.1 million of investment securities available for sale, were $685.2 million at June 30, 2024, or 31.6% of total assets. During the six months ended June 30, 2024, the investment securities portfolio decreased by $20.7 million, or 2.9%. The decrease in the investment securities balance was primarily due to principal repayments. At June 30, 2024, none of the underlying collateral for the securities consisted of subprime or Alt-A (traditionally defined as nonconforming loans having less than full documentation) loans.
Deposits. Deposits were $1.6 billion at June 30, 2024, a decrease of $63.9 million, or 3.9%, since December 31, 2023. The decrease in deposits was primarily due to decreases of $37.5 million in passbook savings accounts, $25.7 million in checking accounts, and $1.3 million in money market accounts. The decrease in deposits occurred primarily as customers sought higher interest rates than what we offer.
Borrowings. Total borrowings were $297.0 million at June 30, 2024, a decrease of $5.0 million, or 1.7%, since December 31, 2023. Our borrowings consist of advances from the Federal Home Loan Bank (FHLB) and Federal Reserve Bank (FRB) and funds borrowed under securities sold under agreements to repurchase.
Stockholders’ Equity. Total stockholders’ equity was $249.2 million at June 30, 2024, a decrease of $1.9 million, or 0.8%, from $251.1 million at December 31, 2023. The decrease in stockholders’ equity was primarily due to the net loss, an increase in the unrealized loss on available-for-sale securities, and dividends declared.
Average Balance and Yields
The following table sets forth the average balance sheet, yields and rates, and certain other information for the periods indicated. No tax-equivalent yield adjustments were made, as we did not hold any tax-free investments. All average balances are daily average balances. Nonaccrual loans were included in the computation of average balances and are included with accrual loans in the tables. However, no interest income was attributed to nonaccrual loans. The yields set forth below include the effect of net deferred costs, discounts, and premiums that are amortized or accreted to interest income of $88,000 and $126,000 for the three and six months ended June 30, 2024, respectively, and $38,000 and $102,000 for the three and six months ended June 30, 2023, respectively.