; or (II) engaged in a committed relationship with the borrower akin to marriage but was prohibited, at the time of the mortgage loan origination, from legally marrying the borrower based on the gender of both the borrower and non-borrowing spouse, but was legally married before the death of the borrower, as determined by the law of the State in which the spouse and borrower reside or resided or the State of celebration, to the borrower and remained married until the death of the borrower; (ii) currently resides and resided in the property secured by the mortgage insured under this section as his or her principal residence at origination of the mortgage and throughout the duration of the borrower’s life; and (iii) has obtained or is able to obtain, before the date of foreclosure on the mortgage pursuant to the death of the last surviving borrower— (I) good, marketable title to or an ownership interest in the property subject to the mortgage; or (II) a legal or other right (including a will, an executed lease, or court order) to remain in the property for life. (C) Non-borrowing spouse For purposes of this subsection, the term non-borrowing spouse means, with respect to a borrower under a mortgage insured under this section, the spouse of such borrower who is not also a borrower. (5) Mortgagee optional election assignment In implementing the Mortgagee Optional Election Assignment for home equity conversion mortgages insured under this section, the Secretary shall use the definition of eligible non-borrowing spouse under paragraph (4) of this subsection in lieu of the definition of eligible surviving non-borrowing spouse under the definition provisions of Mortgagee Letter 2015–15 (June 12, 2015) or any other definition. . 3. Consultation with Bureau of Consumer Financial Protection Section 255 of the National Housing Act ( 12 U.S.C. 1715z–20 ) is amended— (1) by redesignating subsection (r) as subsection (q)