(a) A bank may purchase, carry as an asset, and convey real estate only:
(1) as provided for in section 47.10;
(2) if acquired through foreclosure of a mortgage given to it in good faith as security for loans made by or money due to it;
(3) if conveyed to it in satisfaction of debts previously contracted in good faith in the course of its dealings;
(4) if acquired by sale on execution or judgment of a court in its favor; or
(5) if reasonably necessary to mitigate or avoid loss on a loan or investment theretofore made.
(b) Real estate acquired under paragraph (a), clauses (2) to (5), shall be carried as an asset only in accordance with rules the commissioner prescribes. The maximum period for holding other real estate as an asset shall be five years, provided that upon application to the commissioner, the commissioner may approve the possession of such real estate by a bank for a period longer than five years, but not to exceed an additional five years, if:
(1) the bank has made a good faith attempt to dispose of the real estate within the initial five-year period; or
(2) disposal within the initial five-year period would be detrimental to the bank.
Real estate owned by a bank as a result of actions authorized in subdivision 1, paragraph (a), clauses (2) to (5), and subsequently sold to any buyer on a contract for deed may not be considered creating a liability to a bank for purposes of section 48.24.
Notwithstanding any rules of the commissioner to the contrary, if real estate owned by a bank pursuant to subdivision 1, paragraph (a), clauses (2) to (5), is not sold or otherwise disposed of within the maximum period, the bank may write off any remaining balance at a rate not less than one-fifth of that balance each subsequent calendar year.