1. Short title This Act may be cited as the Preventing Foreclosures on Seniors Act of 2017 . 2. Safeguards to prevent displacement of homeowner Subsection (j) of section 255 of the National Housing Act ( 12 U.S.C. 1715z–20(j) ) is amended— (1) by striking the subsection designation and all that follows through The Secretary and inserting the following: (j) Safeguards To prevent displacement of homeowner (1) Deferral of homeowner’s obligation The Secretary ; and (2) by adding at the end the following new paragraphs: (2) Assignment of mortgage to HUD upon death of borrowing spouse with surviving non-borrowing spouse (A) Assignment; notice The Secretary shall require the mortgagee of a mortgage insured under this section, upon the death of the last surviving borrower under such mortgage who is survived by an eligible non-borrowing spouse— (i) to assign the mortgage to the Secretary; and (ii) not later than the expiration of the 7-day period beginning upon notice to the mortgagee of the death of the borrower, to notify the eligible non-borrowing spouse in writing— (I) of the opportunity, pursuant to subparagraph (B), for the eligible non-borrowing spouse to remain in the property that is subject to the mortgage