loans and other interest-earning assets, partially offset by the impact of increased average loans and lower rates on deposits.
Net interest income decreased $7.4 million during the year ended December 31, 2020, compared to the year ended December 31, 2019, primarily due to higher average interest-bearing deposits, lower rates on loans, securities and other interest-earning assets, partially offset by the impact of lower rates on deposits and increased average loans and other interest-earning assets.
The yield on interest-earning assets was 3.79% for the fourth quarter of 2020, compared to 3.75% for the third quarter of 2020 and 4.73% for the fourth quarter of 2019. The cost of interest-bearing liabilities was 0.39% for the fourth quarter of 2020, 0.46% for the third quarter of 2020 and 1.11% for the fourth quarter of 2019. The Company’s net interest margin on a tax equivalent basis was 3.62% for the fourth quarter of 2020, compared to 3.55% for the third quarter of 2020 and 4.18% for the fourth quarter of 2019. The increase in the net interest margin for the quarter ended December 31, 2020, was primarily due to a decrease in rates for interest-bearing deposits. The decrease in the net interest margin on a tax equivalent basis for the quarter and year ended December 31, 2020, compared to the quarter and year ended December 31, 2019, was primarily due to a decrease in rates on interest-earning assets, partially offset by an increase in the volume of loans and a decrease in rates on interest-bearing deposits.
The yield on interest-earning assets was 3.98% for the year ended December 31, 2020, compared to 4.95% for the year ended December 31, 2019. The cost of interest-bearing liabilities was 0.57% for the year ended December 31, 2020 and 1.07% for the year ended December 31, 2019. The Company’s net interest margin on a tax equivalent basis was 3.73% for the year ended December 31, 2020, compared to 4.42% for the year ended December 31, 2019. Yields on interest-earning assets decreased and the costs of interest-bearing liabilities did not decrease to the same extent, which caused compression of the Company’s net interest margin on a tax equivalent basis during 2020.
The average yield on loans increased to 4.42% for the quarter ended December 31, 2020, compared to 4.37% for the quarter ended September 30, 2020, while the cost of interest-bearing deposits decreased to 0.35% from 0.42% for the same periods. The cost of total deposits was 0.19% for the quarter ended December 31, 2020 and 0.23% for the quarter ended September 30, 2020.
Provision/Recapture for Credit Losses
The Company had a credit reserve recapture of $135,000 for the fourth quarter of 2020, compared to a provision of $4.1 million for the third quarter of 2020 and a recapture of $148,000 for the fourth quarter of 2019. The recapture in the fourth quarter of 2020 was primarily related to a $364,000 recapture for unfunded commitments, partially offset by a provision of $229,000 for loans. The recapture in the fourth quarter related to unfunded commitments was due to a decrease in the total unfunded commitments from the third to fourth quarter of 2020.
The provision for credit losses was $18.9 million for the year ended December 31, 2020, an increase of $16.5 million compared to the year ended December 31, 2019, primarily due to the impact of the COVID-19 pandemic, the sustained instability of the oil and gas industry, an increase in adversely graded loans and an increase in charge-offs.
The ACL for loans was $40.6 million, or 1.39% of loans excluding loans held for sale, at December 31, 2020, compared to $44.1 million, or 1.49% of loans excluding loans held for sale, at September 30, 2020 and $25.3 million, or 0.96% of loans excluding loans held for sale, at December 31, 2019. The decrease in the ACL from September 30, 2020 to December 31, 2020 was primarily due to a $3.5 million charge-off that was fully reserved for during prior quarters. The increase in the ACL from December 31, 2019 to December 31, 2020 was due to the impact of the COVID-19 pandemic, the sustained instability of the oil and gas industry, an increase in adversely graded loans and an increase in charge-offs. The increase in 2020 was also due to the adoption of Accounting Standards Update, or ASU 2016-13, Financial Instruments—Credit Losses (Topic 326): Measurement of Credit Losses on Financial Instruments, or CECL, effective January 1, 2020.
The liability associated with the ACL for unfunded commitments was $4.2 million at December 31, 2020, compared to $4.5 million at September 30, 2020 and $378,000 at December 31, 2019. The increase in 2020 was primarily due to the adoption of CECL, effective January 1, 2020, the impact of the COVID-19 pandemic and the sustained instability of the oil and gas industry, as noted above.