Housing shall qualify as affordable housing for purposes of this chapter only if—
each dwelling unit in the housing—
(A) in the case of rental housing, is made available for occupancy only by a family that is a low-income family at the time of their initial occupancy of such unit;
(B) in the case of a contract to purchase existing housing, is made available for purchase only by a family that is a low-income family at the time of purchase;
(C) in the case of a lease-purchase agreement for existing housing or for housing to be constructed, is made available for lease-purchase only by a family that is a low-income family at the time the agreement is entered into; and
(D) in the case of a contract to purchase housing to be constructed, is made available for purchase only by a family that is a low-income family at the time the contract is entered into; and
except for housing assisted under section 1437bb of title 42 (as in effect before the date of the effectiveness of this chapter), each dwelling unit in the housing will remain affordable, according to binding commitments satisfactory to the Secretary, for the remaining useful life of the property (as determined by the Secretary) without regard to the term of the mortgage or to transfer of ownership, or for such other period that the Secretary determines is the longest feasible period of time consistent with sound economics and the purposes of this chapter, except upon a foreclosure by a lender (or upon other transfer in lieu of foreclosure) if such action—
(A) recognizes any contractual or legal rights of public agencies, nonprofit sponsors, or others to take actions that would avoid termination of low-income affordability in the case of foreclosure or transfer in lieu of foreclosure; and
(B) is not for the purpose of avoiding low-income affordability restrictions, as determined by the Secretary.
Notwithstanding subsection (a), housing assisted pursuant to section 4131(b)(2) of this title shall be considered affordable housing for purposes of this chapter.
The provisions of paragraph (2) of subsection (a) regarding binding commitments for the remaining useful life of property shall not apply to a family or household member who subsequently takes ownership of a homeownership unit.
(Pub. L. 104–330, title II, § 205, Oct. 26, 1996, 110 Stat. 4033; Pub. L. 105–276, title V, § 595(e)(8), Oct. 21, 1998, 112 Stat. 2657; Pub. L. 110–411, title II, § 204, Oct. 14, 2008, 122 Stat. 4326.)