| Securities |
mortized cost, gross unrealized gains and losses, and estimated fair value of debt securities held to maturity and debt securities available for sale are as follows: | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | December 31, 2021 | | | | Recognized in OCI (1) | | | | Not recognized in OCI | | | | | Amortized Cost | | Gross Unrealized Gains | | Gross Unrealized Losses | | Carrying Value | | Gross Unrealized Gains | | Gross Unrealized Losses | | Estimated Fair Value | | | (In millions) | | Debt securities held to maturity: | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Mortgage-backed securities: | | | | | | | | | | | | | | | Residential agency | $ | 370 | | | $ | — | | | $ | (13) | | | $ | 357 | | | $ | 20 | | | $ | — | | | $ | 377 | | | Commercial agency | 543 | | | — | | | (1) | | | 542 | | | 31 | | | — | | | 573 | | | $ | 913 | | | $ | — | | | $ | (14) | | | $ | 899 | | | $ | 51 | | | $ | — | | | $ | 950 | | | | | | | | | | | | | | | | | Debt securities available for sale: | | | | | | | | | | | | | | | U.S. Treasury securities | $ | 1,137 | | | $ | 2 | | | $ | (7) | | | $ | 1,132 | | | | | | | $ | 1,132 | | | Federal agency securities | 94 | | | 1 | | | (3) | | | 92 | | | | | | | 92 | | | Obligations of states and political subdivisions | 4 | | | — | | | — | | | 4 | | | | | | | 4 | | | Mortgage-backed securities: | | | | | | | | | | | | | | | Residential agency | 18,873 | | | 287 | | | (198) | | | 18,962 | | | | | | | 18,962 | | | Residential non-agency | 1 | | | — | | | — | | | 1 | | | | | | | 1 | | | Commercial agency | 6,271 | | | 163 | | | (61) | | | 6,373 | | | | | | | 6,373 | | | Commercial non-agency | 532 | | | 4 | | | — | | | 536 | | | | | | | 536 | | | Corporate and other debt securities | 1,351 | | | 36 | | | (6) | | | 1,381 | | | | | | | 1,381 | | | $ | 28,263 | | | $ | 493 | | | $ | (275) | | | $ | 28,481 | | | | | | | $ | 28,481 | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | December 31, 2020 | | | | Recognized in OCI (1) | | | | Not recognized in OCI | | | | | Amortized Cost | | Gross Unrealized Gains | | Gross Unrealized Losses | | Carrying Value | | Gross Unrealized Gains | | Gross Unrealized Losses | | Estimated Fair Value | | | (In millions) | | Debt securities held to maturity: | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Mortgage-backed securities: | | | | | | | | | | | | | | | Residential agency | $ | 554 | | | $ | — | | | $ | (19) | | | $ | 535 | | | $ | 34 | | | $ | — | | | $ | 569 | | | Commercial agency | 589 | | | — | | | (2) | | | 587 | | | 59 | | | — | | | 646 | | | $ | 1,143 | | | $ | — | | | $ | (21) | | | $ | 1,122 | | | $ | 93 | | | $ | — | | | $ | 1,215 | | | | | | | | | | | | | | | | | Debt securities available for sale: | | | | | | | | | | | | | | | U.S. Treasury securities | $ | 178 | | | $ | 5 | | | $ | — | | | $ | 183 | | | | | | | $ | 183 | | | Federal agency securities | 102 | | | 3 | | | — | | | 105 | | | | | | | 105 | | | | | | | | | | | | | | | | | Mortgage-backed securities: | | | | | | | | | | | | | | | Residential agency | 18,455 | | | 625 | | | (4) | | | 19,076 | | | | | | | 19,076 | | | Residential non-agency | 1 | | | — | | | — | | | 1 | | | | | | | 1 | | | Commercial agency | 5,659 | | | 346 | | | (6) | | | 5,999 | | | | | | | 5,999 | | | Commercial non-agency | 571 | | | 15 | | | — | | | 586 | | | | | | | 586 | | | Corporate and other debt securities | 1,126 | | | 78 | | | — | | | 1,204 | | | | | | | 1,204 | | | $ | 26,092 | | | $ | 1,072 | | | $ | (10) | | | $ | 27,154 | | | | | | | $ | 27,154 | |
_________ (1)The gross unrealized losses recognized in OCI on securities held to maturity resulted from a transfer of securities available for sale to held to maturity in the second quarter of 2013. Debt securities with carrying values of $9.2 billion and $10.3 billion at December 31, 2021 and 2020, respectively, were pledged to secure public funds, trust deposits and certain borrowing arrangements. There were no encumbered U.S. Treasury securities included within total pledged securities at December 31, 2021, compared to approximately $24 million at December 31, 2020. The amortized cost and estimated fair value of debt securities held to maturity and debt securities available for sale at December 31, 2021, by contractual maturity, are shown below. Expected maturities will differ from contractual maturities because borrowers may have the right to call or prepay obligations with or without call or prepayment penalties. | | | | | | | | | | | | | Amortized Cost | | Estimated Fair Value | | | (In millions) | | Debt securities held to maturity: | | | | | Mortgage-backed securities: | | | | | Residential agency | $ | 370 | | | $ | 377 | | | Commercial agency | 543 | | | 573 | | | $ | 913 | | | $ | 950 | | | Debt securities available for sale: | | | | | Due in one year or less | $ | 325 | | | $ | 328 | | | Due after one year through five years | 1,289 | | | 1,304 | | | Due after five years through ten years | 855 | | | 860 | | | Due after ten years | 117 | | | 117 | | | Mortgage-backed securities: | | | | | Residential agency | 18,873 | | | 18,962 | | | Residential non-agency | 1 | | | 1 | | | Commercial agency | 6,271 | | | 6,373 | | | Commercial non-agency | 532 | | | 536 | | | $ | 28,263 | | | $ | 28,481 | |
The following tables present gross unrealized losses and the related estimated fair value of debt securities available for sale at December 31, 2021 and 2020. These securities are segregated between investments that have been in a continuous unrealized loss position for less than twelve months and for twelve months or more. | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | December 31, 2021 | | | Less Than Twelve Months | | Twelve Months or More | | Total | | | Estimated Fair Value | | Gross Unrealized Losses | | Estimated Fair Value | | Gross Unrealized Losses | | Estimated Fair Value | | Gross Unrealized Losses | | | (In millions) | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Debt securities available for sale: | | | | | | | | | | | | | U.S Treasury securities | $ | 1,010 | | | $ | (7) | | | $ | — | | | $ | — | | | $ | 1,010 | | | $ | (7) | | | Federal agency securities | 63 | | | (3) | | | — | | | — | | | 63 | | | (3) | | | Mortgage-backed securities: | | | | | | | | | | | | | Residential agency | $ | 9,528 | | | $ | (171) | | | $ | 686 | | | $ | (27) | | | $ | 10,214 | | | $ | (198) | | | | | | | | | | | | | | | Commercial agency | 1,333 | | | (29) | | | 760 | | | (32) | | | 2,093 | | | (61) | | | | | | | | | | | | | | | Corporate and other debt securities | 444 | | | (6) | | | — | | | — | | | 444 | | | (6) | | | $ | 12,378 | | | $ | (216) | | | $ | 1,446 | | | $ | (59) | | | $ | 13,824 | | | $ | (275) | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | December 31, 2020 | | | Less Than Twelve Months | | Twelve Months or More | | Total | | | Estimated Fair Value | | Gross Unrealized Losses | | Estimated Fair Value | | Gross Unrealized Losses | | Estimated Fair Value | | Gross Unrealized Losses | | | (In millions) | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Debt securities available for sale: | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Mortgage-backed securities: | | | | | | | | | | | | | Residential agency | $ | 914 | | | $ | (4) | | | $ | 101 | | | $ | — | | | $ | 1,015 | | | $ | (4) | | | | | | | | | | | | | | | Commercial agency | 819 | | | (6) | | | — | | | — | | | 819 | | | (6) | | | | | | | | | | | | | | | | | | | | | | | | | | | $ | 1,733 | | | $ | (10) | | | $ | 101 | | | $ | — | | | $ | 1,834 | | | $ | (10) | |
The number of individual debt positions in an unrealized loss position in the tables above increased from 129 at December 31, 2020 to 479 at December 31, 2021. The increase in the number of securities and the total amount of gross unrealized losses was primarily due to changes in market interest rates. In instances where an unrealized loss existed, there was no indication of an adverse change in credit on the underlying positions in the tables above. As it relates to these positions, management believes no individual unrealized loss, other than those discussed below, represented credit impairment as of those dates. The Company does not intend to sell, and it is not more likely than not that the Company will be required to sell, the positions before the recovery of their amortized cost basis, which may be at maturity. Gross realized gains and gross realized losses on sales of debt securities available for sale were immaterial for both 2021 and 2020, and are shown in the table below for 2019. The cost of securities sold is based on the specific identification method. As part of the Company's normal process for evaluating impairment, management did identify a limited number of positions where impairment was believed to exist in 2019, as shown in the table below. | | | | | | | | | | | | | | | | Year Ended December 31 | | | | | | | 2019 | | | | | | | (In millions) | | Gross realized gains | | | | | $ | 16 | | | Gross realized losses | | | | | (43) | | | Impairment | | | | | (1) | | | Securities gains (losses), net | | | | | $ | (28) | |
|