A national banking association may purchase, hold, and convey real estate for the following purposes, and for no others:
First. Such as shall be necessary for its accommodation in the transaction of its business.
Second. Such as shall be mortgaged to it in good faith by way of security for debts previously contracted.
Third. Such as shall be conveyed to it in satisfaction of debts previously contracted in the course of its dealings.
Fourth. Such as it shall purchase at sales under judgments, decrees, or mortgages held by the association, or shall purchase to secure debts due to it.
But no such association shall hold the possession of any real estate under mortgage, or the title and possession of any real estate purchased to secure any debts due to it, for a longer period than five years except as otherwise provided in this section.
For real estate in the possession of a national banking association upon application by the association, the Comptroller of the Currency may approve the possession of any such real estate by such association for a period longer than five years, but not to exceed an additional five years, if (1) the association has made a good faith attempt to dispose of the real estate within the five-year period, or (2) disposal within the five-year period would be detrimental to the association. Upon notification by the association to the Comptroller of the Currency that such conditions exist that require the expenditure of funds for the development and improvement of such real estate, and subject to such conditions and limitations as the Comptroller of the Currency shall prescribe, the association may expend such funds as are needed to enable such association to recover its total investment.
Notwithstanding the five-year holding limitation of this section or any other provision of title 62 of the Revised Statutes, any national banking association which on October 15, 1982, held, directly or indirectly, real estate, including any subsurface rights or interests therein, that since December 31, 1979, had not been valued on the books of such association for more than a nominal amount, may continue to hold such real estate, rights, or interests for such longer period of time as would be permitted a State chartered bank by the law of the State in which the association is located if the aggregate amount of earnings from such real estate, rights, or interests is separately disclosed in the annual financial statements of the association.