liabilities was 0.31% for 2021 and 0.57% for 2020. The Company’s net interest margin on a tax equivalent basis was 3.31% for 2021, compared to 3.73% for 2020.
Provision (Recapture) for Credit Losses
The provision for credit losses was a recapture of credit losses of $1.2 million for the fourth quarter of 2021, compared to a recapture of $4.9 million for the third quarter of 2021 and a recapture of $135,000 for the fourth quarter of 2020.
The recapture of credit losses of $1.2 million for the fourth quarter of 2021 primarily resulted from qualitative factor adjustments associated with continued improvements in the local economy.
The recapture of credit losses of $135,000 for the fourth quarter of 2020 was comprised of a recapture of credit losses of $364,000 related to unfunded commitments as a result of a decrease in availability and a provision for credit losses of $229,000 for loans.
The recapture of credit losses of $10.8 million in 2021 primarily resulted from the adjustment of certain qualitative factors used to determine the ACL due to the continued improvements in the national and local economies and forecast assumptions. The provision for credit losses of $18.9 million in 2020 primarily resulted from the impact of the COVID-19 pandemic, sustained instability of the oil and gas industry, an increase in adversely graded loans and an increase in charge-offs of $3.1 million from 2019 to 2020.
The ACL for loans was $31.3 million, or 1.09%, to loans excluding loans held for sale at December 31, 2021, $32.2 million, or 1.23%, at September 30, 2021 and $40.6 million, or 1.39%, at December 31, 2020. The decrease in the ACL for loans during 2021, as compared to 2020, was primarily the result of the adjustment of certain qualitative factors utilized in the Company’s ACL estimate due to the continued improvements in the national and local economies and forecast assumptions.
Noninterest Income
Noninterest income was $4.1 million for the fourth quarter of 2021, $5.6 million for the third quarter of 2021 and $3.5 million for the fourth quarter of 2020. The decrease of $1.5 million for the fourth quarter of 2021, compared to the third quarter of 2021, was primarily due to gains of $1.9 million recorded during the third quarter of 2021 related to bank-owned life insurance policies.
Noninterest income was $16.3 million for 2021 and $14.8 million for 2020. The increase of $1.5 million for 2021, compared to 2020, was primarily due to gains of $1.9 million related to bank-owned life insurance policies recorded during 2021, compared to gains of $769,000 related to bank-owned life insurance policies recorded during 2020. Net gains on sales of assets increased $1.1 million from $755,000 for 2020 to $1.8 million for 2021.
Noninterest Expense
Noninterest expense was $34.8 million for the fourth quarter of 2021, compared to $24.4 million for the third quarter of 2021 and $23.7 million for the fourth quarter of 2020. The increase in noninterest expense of $10.5 million between the third and fourth quarters of 2021 and the increase of $11.2 million between the fourth quarters of 2020 and 2021 were primarily due to the payment of $8.0 million to resolve BSA/AML compliance matters and $1.3 million of costs related to the pending merger with Allegiance. The Company incurred $400,000 of merger related costs in the third quarter of 2021.
The increase in noninterest expense of $15.6 million for 2021, compared to 2020, was primarily due to the payment of $8.0 million to resolve BSA/AML compliance matters, $1.7 million of costs related to the pending merger with Allegiance included in 2021 and a $5.1 million increase in salaries and employee benefits. The increase in salaries and employee benefits during 2021, compared to 2020, resulted from increased claims under the Company’s self-funded health plan, increased bonus expense, increased stock-based compensation expense and increased salary expense.
On December 16, 2021, the Bank, entered into a consent order with the Office of the Comptroller of the Currency, or OCC, regarding BSA/AML compliance matters, or the OCC Consent Order. Under the OCC Consent Order, the Bank paid a civil money penalty of $1.0 million.