; or (B) the expiration of the 6-year period described in paragraph (1), as such period may be extended under paragraph (4). (3) Retention of funds Notwithstanding paragraph (1), the Secretary may allow a grantee under this section to retain— (A) amounts needed to close out grants; and (B) up to 10 percent of the remaining funds to support maintenance of the minimal capacity to launch a new program in the event of a future disaster and to support pre-disaster long-term recovery and mitigation planning. (4) Extension of period for use of funds The Secretary may extend the 6-year period described in paragraph (1) by not more than 4 years, or not more than 6 years for mitigation activities, if— (A) the grantee submits to the Secretary— (i) written documentation of the exigent circumstances impacting the ability of the grantee to expend funds that could not be anticipated; or (ii) a justification that such request is necessary due to the nature and complexity of the program and projects