; (C) in paragraph (2), as redesignated, by inserting except as provided in subsection (c)(3), before funds available ; and (D) by striking (2) Accordingly, and all that follows through 1990. ; (2) in subsection (c)— (A) by striking paragraph (2) and inserting the following: (2) Priority Notwithstanding any other provision of law, excess defense articles under this section shall be transferred in accordance with United States foreign policy, including national security priorities as jointly determined by the Secretary of State, in consultation with the Secretary of Defense, to the maximum extent feasible. ; and (B) by adding at the end the following: (3) Supporting costs Funds available to the Department of State for security assistance may be expended for the refurbishment or upgrade of excess defense articles transferred under the authority of this section and for training of foreign security forces directly in relation to excess defense articles transferred under the authority of this section, if— (A) such assistance is necessary to advance the national security objectives of the United States in relation to the recipient country or countries; and (B) such costs do not exceed $10 million in relation to a single transfer of excess defense articles under this section. ; (3) in subsection (f)(1), by striking $7,000,000 and inserting $25,000,000 ; and (4) in subsection (g)(1), by striking $500,000,000 and inserting $600,000,000 . 822. Modification of purposes for which military sales by the United States are authorized Section 4 of the Arms Export Control Act ( 22 U.S.C. 2754 ) is amended in the first sentence by striking internal security and inserting legitimate internal security (including for anti-terrorism purposes) . 823. Return of defense articles Section 21(m)(1)(B) of the Arms Export Control Act ( 22 U.S.C. 2761(m)(1)(B) ) is amended— (1) by striking (B) is not and inserting (B)(i) is not ; (2) by striking ; and and inserting ; or