service performance and features, digital and branch presence, account and loan options, interest rate offerings, and fees. This award acknowledges that our strategy is resonating with customers. I am proud of our employees and congratulate them on earning this great award.”
DIVIDEND DECLARED
The Board of Directors voted to declare a cash dividend of $0.24 per share to shareholders of record at the close of business on November 17, 2021, payable on December 17, 2021. This dividend equates to a 3.42% annualized yield based on the $28.05 closing price of the Company's common stock at the end of the third quarter of 2021.
FINANCIAL CONDITION
Total assets were $3.7 billion at the end of the third quarter. Bar Harbor Bankshares (the “Company”) executed a balance sheet delever and security remix strategy where $89.0 million of Federal Home Loan Bank advances were prepaid and $43.5 million of securities were sold to reduce credit risk exposure while generating gains. The replenishment of those securities is expected to be fulfilled early in the fourth quarter 2021.
Loans were $2.5 billion at the end of the third quarter reflecting growth of $18.6 million or 3% on an annualized basis. Excluding PPP loans, commercial loans increased $38.0 million led by two new relationships totaling $21.2 million as well as the deepening of existing commercial relationships. PPP loan balances totaled $24.2 million at quarter-end, consisting of $24.1 million of 2021 originations and $145 thousand from 2020. Unearned deferred fees on PPP loans totaled $1.2 million at the end of the quarter and are expected to be mostly recognized by year-end 2021. COVID loan modifications totaled $4.7 million, down from $19.0 million at the end of the second quarter 2021. Total residential loans increased $26.9 million from the end of the second quarter 2021, which primarily included $39.0 million of originations that were strategically put on the balance sheet when rates were higher in the quarter.
The allowance for credit losses was $22.4 million for the third quarter. As economic forecasts continue to improve the Company maintains its disciplined approach to credit quality with an allowance to total loans coverage ratio of 0.89%. Net charge-offs totaled $193 thousand, or 0.03% of the total loan portfolio, and non-accruing loans decreased to $12.2 million from $13.6 million at the end of the second quarter 2021. The ratio of accruing past due loans to total loans improved to 0.12% of total loans from 0.15% at the end of the second quarter 2021 and 0.58% at year-end 2020.
Total deposits increased $184.8 million to $3.0 billion during the quarter, due to significant core deposit growth. Core deposits grew $186.3 million, or 32% on an annualized basis, during the quarter as over 800 new customer accounts were opened. As a result the loan to deposit ratio improved to 84% from 89% at the end of the second quarter 2021. Time deposits decreased $1.5 million during the quarter as customers continue to move funds to transactional accounts upon contractual maturity.
The Company’s book value per share was $27.92 at September 30, 2021, compared with $27.64 at the end of the second quarter 2021. Tangible book value per share (non-GAAP measure) was $19.48 at the end of the third quarter 2021, compared to $19.17 at the end of the second quarter 2021, an annualized growth rate of 6%. Other comprehensive income included unrealized gains on securities totaling $4.4 million in the third quarter 2021 compared to $7.2 million at the end of the second quarter 2021.
RESULTS OF OPERATIONS
Net income in the third quarter 2021 was $11.0 million, or $0.73 per share, compared to $8.4 million, or $0.56 per share, in the same quarter of 2020. Net income improved on higher fee income and fees from PPP loans in the quarter. PPP loan fees contributed $0.13 to earnings per share in the third quarter of 2021 and $0.06 in the same period of 2020. Core earnings (non-GAAP) totaled $11.0 million or $0.73 per share, compared to $9.2 million, or $0.61 per share, in the same quarter of 2020. Non-core items (non-GAAP) netted to an insignificant amount in the third quarter 2021 and reduced net income by $781 thousand in the same period of 2020.
Net interest margin was 3.02% compared to 2.90% in the same period of 2020. Acceleration of PPP loan fee amortization due to forgiveness contributed 28 basis points to NIM in the third quarter 2021 and 1 basis point in the same period of 2020. Interest-bearing cash balances, held mostly at the Federal Reserve Bank, reduced NIM by 26 basis points in the quarter and 8 basis points in the third quarter 2020. The yield on earning assets totaled 3.41% compared to 3.57% in the third quarter 2020. Excluding the impact of PPP and excess cash, the yield on earning assets totaled 3.42% and 3.67% for the same periods. The yield on loans was 3.98% in the third quarter 2021, 3.70% in the second quarter 2021 and 3.81% in the third quarter of 2020. Excluding PPP loans the yield on loans was 3.62% in the third quarter of 2021, 3.64% in the second quarter of 2021 and 3.83% in the third quarter 2020. Costs of funds decreased to 0.50% from 0.82% in the third quarter 2020 due to lower deposit rates and reduced wholesale borrowings.
The provision for credit losses for the quarter was a benefit of $174 thousand, compared to an expense of $1.8 million in the third quarter of 2020. The provision recapture in the third quarter 2021 is attributable to continued strong credit quality and improving economic forecasts.