; and (B) in any event, not later than the date that is 180 days after the date on which the applicable interlocutory order or final judgment, decree, or order of the district court was issued. (e) Limitation on certain payments Notwithstanding section 1304 of title 31, United States Code, no award may be made under section 504 of title 5, United States Code, or section 2412 of title 28, United States Code, and no amounts may be obligated or expended from the Claims and Judgment Fund of the Treasury to pay any fees or other expenses under those sections, to any person or party in an energy-related cause of action. (f) Legal fees (1) Definition of ultimately prevail In this subsection: (A) In general The term ultimately prevail means a final, enforceable judgment by a court of competent jurisdiction in favor of a party on at least 1 energy-related cause of action that is an underlying rationale for the preliminary injunction, administrative stay, or other relief requested by the party. (B) Exclusion The term ultimately prevail does not include any situation in which the relevant final agency action is modified or amended by the issuing agency, unless the modification or amendment is required pursuant to— (i) a final, enforceable judgment of the court; or (ii) a court-ordered consent decree. (2) Award (A) In general In any energy-related cause of action in which the plaintiff does not ultimately prevail, the court shall award to the defendant (including any intervenor-defendants), other than the United States, fees and other expenses incurred by that defendant in connection with the energy-related cause of action, unless the court finds that— (i) the position of the plaintiff was substantially justified, in accordance with subparagraph (B)