assistance contract for a project, the term of the restrictive use agreement for the project shall be consistent with the term of the restructured loan for the project. (B) Extension of rental assistance contract If the Secretary enters into a 20-year extension of the rental assistance contract for a project, the term of the restrictive use agreement for the project shall be for 20 years. (C) Termination The Secretary may terminate the 20-year use restrictive use agreement for a project before the end of the term of the agreement if the 20-year rental assistance contract for the project with the owner is terminated at any time for reasons outside the control of the owner. (f) Decoupling of rental assistance (1) Renewal of rental assistance contract If the Secretary determines that a maturing loan for a project cannot reasonably be restructured in accordance with subsection (c) because it is not financially feasible or the owner does not agree with the proposed restructuring, and the project was operating with rental assistance under section 521, the Secretary may renew the rental assistance contract, notwithstanding any provision of section 521, for a term, subject to annual appropriations, of 20 years, provided that the owner enters into a restrictive use agreement. (2) Additional rental assistance With respect to a project described in paragraph (1), if rental assistance is not available for all households in the project, the Secretary may extend such additional rental assistance to unassisted households at that project as is necessary to make the project safe and affordable to low-income households. (3) Rents Any agreement to extend the term of the rental assistance contract under section 521 for a project shall obligate the owner to continue to maintain the project as decent, safe, and sanitary housing and to operate the development in accordance with this title, except that rents shall be based on the lesser of— (A) the budget-based needs of the project