; and (B) the Agency or the Federal Trade Commission may intervene as a party in any such action brought by the other agency, and, upon intervening— (i) be heard on all matters arising in such enforcement action; and (ii) file petitions for appeal in such actions. (3) Agreement terms The terms of any agreement negotiated under paragraph (1) may modify or supersede the provisions of paragraph (2). (4) Deadline The agencies shall reach the agreement required under paragraph (1) not later than 6 months after the designated transfer date. 406. Enforcement by States (a) Civil action In any case in which the attorney general of a State has reason to believe that an interest of the residents of such State has been or is adversely affected by any person who violates any provision of this Act or a rule or order prescribed under this Act, the attorney general of the State, as parens patriae, may bring a civil action on behalf of the residents of the State in an appropriate State court or an appropriate district court of the United States— (1) to enjoin further violation of such provision by the defendant; (2) to compel compliance with such provision; or (3) to obtain relief under section 408. (b) Rights of agency Before initiating a civil action under subsection (a), the attorney general of a State shall notify the Agency in writing of such civil action. Upon receiving notice with respect to a civil action, the Agency may— (1) intervene in such action; and (2) upon intervening— (A) be heard on all matters arising in such civil action