Securities Held-to-Maturity. Securities held-to-maturity increased $13.0 million, or 14.2%, to $105.1 million at June 30, 2021 from $92.1 million at June 30, 2020, as we invested excess cash into securities to increase our overall yield.
Total Liabilities. Total liabilities increased $4.5 million, or 1.6%, to $290.2 million at June 30, 2021 from $285.8 million at June 30, 2020. The increase reflected an increase in deposits of $7.2 million, or 2.6%, offset by a $2.8 million decrease in Federal Home Loan Bank advances to $918,000.
Deposits. Deposits increased $7.2 million, or 2.6%, to $284.6 million at June 30, 2021 from $277.5 million at June 30, 2020. The increase was primarily due to a $10.2 million, or 32.8%, increase in money market accounts, a $7.3 million, or 11.9%, increase in savings accounts, a $5.2 million, or 20.8%, increase in non-interest-bearing deposits and a $3.6 million, or 12.4%, increase in interest-bearing demand deposits. The increase in deposits reflected the receipt of government stimulus funds combined with reduced spending by customers during the pandemic. The increases were offset by a $19.2 million, or 14.7%, decrease in certificates of deposit as many depositors chose to maintain such funds in other types of deposits and not to renew such certificates of deposit due to low market interest rates.
Borrowings. Borrowings, consisting entirely of Federal Home Loan Bank advances, totaled $918,000 at June 30, 2021 compared to $3.7 million at June 30, 2021. The decrease in Federal Home Loan Bank advances reflected the repayment of $2.8 million of advances during fiscal 2021 as we required lower levels of borrowings to fund operations in fiscal 2021.
Retained Earnings. Retained earnings increased $1.4 million, or 3.0%, to $48.6 million at June 30, 2021 from $47.2 million at June 30, 2020. The increase resulted from net income of $1.4 million for the year ended June 30, 2021.
Comparison of Operating Results for the Years Ended June 30, 2021 and June 30, 2020
General. We had net income of $1.4 million for the year ended June 30, 2021, compared to net income of $1.7 million for the year ended June 30, 2020, a decrease of $331,000, or 19.2%. The decrease in net income was primarily due to a decrease in net interest income of $249,000, or 3.3% and an increase of $99,000, or 1.6%, in non-interest expense, offset by a decrease of $32,000, or 11.5%, in the provision for income taxes.
Interest and Dividend Income. Interest and dividend income decreased $888,000, or 8.6%, to $9.5 million for the year ended June 30, 2021 from $10.4 million for the year ended June 30, 2020. The decrease was primarily attributable to a $561,000 decrease in interest on loans and a $194,000 decrease in interest on securities. Interest income on loans decreased primarily due to a decrease in the average balance of loans of $7.2 million to $180.6 million for fiscal 2021 from $187.8 million for fiscal 2020 and, to a lesser extent, due to a decrease in the average yield on loans of 15 basis points to 3.93% for fiscal 2021 from 4.08% for fiscal 2020. Interest income on securities decreased primarily due to a decrease in the average yield on securities of 19 basis points to 2.43% for fiscal 2021 from 2.62% for fiscal 2020, and, to a lesser extent, a decrease in the average balance of securities of $398,000 to $96.4 million for fiscal 2021 from $96.8 million for fiscal 2020. The decreases in the average yield reflected the lower market interest rate environment.
Interest Expense. Interest expense decreased $639,000, or 23.5%, to $2.1 million for the year ended June 30, 2021 from $2.7 million for the year ended June 30, 2020. The decrease was primarily due to a decrease of $556,000, or 23.4%, in interest expense on certificates of deposit. The average cost of certificates of deposit decreased 51 basis points to 1.51% for fiscal 2021 from 2.02% for fiscal 2020; however the average balance of certificates of deposit increased $2.6 million to $120.2 million for fiscal 2021 from $117.5 million for fiscal 2020. Additionally, interest expense on borrowings, consisting entirely of FHLB advances, decreased $88,000, or 59.9%, to $59,000 for fiscal 2021 from $147,000 for fiscal 2020 due primarily to the decrease in the average balance of borrowings to $2.1 million for fiscal 2021 from $5.6 million for fiscal 2020. Partially offsetting such decline was an increase in the cost of borrowings of 21 basis points to 2.86% for fiscal 2021 from 2.65% for fiscal 2020 due to the maturity of a lower-costing borrowing.
Net Interest Income. Net interest income decreased $249,000, or 3.3%, to $7.4 million for the year ended June 30, 2021 from $7.7 million for the year ended June 30, 2020. While average net interest-earning assets increased $6.2 million, our net interest rate spread decreased to 2.13% for the year ended June 30, 2021 from 2.29%
53