into account under subsection (a) in the taxable year during which the plan described in subsection (b)(5) has been completed and all eligible insourcing expenses pursuant to such plan have been paid or incurred. (2) Election to apply employment test and claim credit in first full taxable year after completion of plan If the taxpayer elects the application of this paragraph, eligible insourcing expenses shall be taken into account under subsection (a) in the first taxable year after the taxable year described in paragraph (1). (e) Possessions treated as part of the United States For purposes of this section, the term United States shall be treated as including each possession of the United States (including the Commonwealth of Puerto Rico and the Commonwealth of the Northern Mariana Islands). (f) Regulations The Secretary shall prescribe such regulations or other guidance as may be necessary or appropriate to carry out the purposes of this section. . (b) Credit To Be Part of General Business Credit Section 38(b) of such Code is amended by striking plus at the end of paragraph (35), by striking the period at the end of paragraph (36) and inserting , plus , and by adding at the end the following new paragraph: (37) the insourcing expenses credit determined under section 45S(a). . (c) Clerical amendment The table of sections for subpart D of part IV of subchapter A of chapter 1 of such Code is amended by adding at the end the following new item: Sec. 45S. Credit for insourcing expenses. . (d) Effective date The amendments made by this section shall apply to amounts paid or incurred after the date of the enactment of this Act. (e) Application to United States possessions (1) Payments to possessions (A) Mirror code possessions The Secretary of the Treasury shall make periodic payments to each possession of the United States with a mirror code tax system in an amount equal to the loss to that possession by reason of section 45S of the Internal Revenue Code of 1986. Such amount shall be determined by the Secretary of