Every nonresident alien individual to whom this section applies and who, within the 10-year period immediately preceding the close of the taxable year, lost United States citizenship shall be taxable for such taxable year in the manner provided in subsection (b) if the tax imposed pursuant to such subsection (after any reduction in such tax under the last sentence of such subsection) exceeds the tax which, without regard to this section, is imposed pursuant to section 871.
Subparagraphs (A) and (B) of subsection (a)(2) shall not apply to an individual described in paragraph (2) or (3).
Gains on the sale or exchange of property (other than stock or debt obligations) located in the United States.
Gains on the sale or exchange of stock issued by a domestic corporation or debt obligations of United States persons or of the United States, a State or political subdivision thereof, or the District of Columbia.
In the case of any exchange of property to which this paragraph applies, notwithstanding any other provision of this title, such property shall be treated as sold for its fair market value on the date of such exchange, and any gain shall be recognized for the taxable year which includes such date.
Subparagraph (A) shall not apply if the individual enters into an agreement with the Secretary which specifies that any income or gain derived from the property acquired in the exchange (or any other property which has a basis determined in whole or part by reference to such property) during such 10-year period shall be treated as from sources within the United States. If the property transferred in the exchange is disposed of by the person acquiring such property, such agreement shall terminate and any gain which was not recognized by reason of such agreement shall be recognized as of the date of such disposition.
To the extent provided in regulations prescribed by the Secretary, subparagraph (B) shall be applied by substituting the 15-year period beginning 5 years before the loss of United States citizenship for the 10-year period referred to therein. In the case of any exchange occurring during such 5 years, any gain recognized under this subparagraph shall be recognized immediately after such loss of citizenship.
If stock in the corporation referred to in subparagraph (A) (or any other stock which has a basis determined in whole or part by reference to such stock) is disposed of during the 10-year period referred to in subsection (a) and while the property referred to in subparagraph (A) is held by such corporation, a pro rata share of such property (determined on the basis of the value of such stock) shall be treated as sold by the corporation immediately before such disposition.
Any long-term resident of the United States who ceases to be a lawful permanent resident of the United States (within the meaning of section 7701(b)(6)) shall be treated for purposes of this section and sections 2107, 2501, and 6039G in the same manner as if such resident were a citizen of the United States who lost United States citizenship on the date of such cessation or commencement.
For purposes of this subsection, the term “long-term resident” means any individual (other than a citizen of the United States) who is a lawful permanent resident of the United States in at least 8 taxable years during the period of 15 taxable years ending with the taxable year during which the event described in paragraph (1) occurs. For purposes of the preceding sentence, an individual shall not be treated as a lawful permanent resident for any taxable year if such individual is treated as a resident of a foreign country for the taxable year under the provisions of a tax treaty between the United States and the foreign country and does not waive the benefits of such treaty applicable to residents of the foreign country.
Subsection (c) shall not apply to an individual who is treated as provided in paragraph (1).
Solely for purposes of determining any tax imposed by reason of this subsection, property which was held by the long-term resident on the date the individual first became a resident of the United States shall be treated as having a basis on such date of not less than the fair market value of such property on such date. The preceding sentence shall not apply if the individual elects not to have such sentence apply. Such an election, once made, shall be irrevocable.
This subsection shall not apply to an individual who is described in a category of individuals prescribed by regulation by the Secretary.
The Secretary shall prescribe such regulations as may be appropriate to carry out this subsection, including regulations providing for the application of this subsection in cases where an alien individual becomes a resident of the United States during the 10-year period after being treated as provided in paragraph (1).
If the Secretary establishes that it is reasonable to believe that an individual’s loss of United States citizenship would, but for this section, result in a substantial reduction for the taxable year in the taxes on his probable income for such year, the burden of proving for such taxable year that such loss of citizenship did not have for one of its principal purposes the avoidance of taxes under this subtitle or subtitle B shall be on such individual.
This section shall not apply to any individual to whom this section would otherwise apply for any taxable year during the 10-year period referred to in subsection (a) in which such individual is physically present in the United States at any time on more than 30 days in the calendar year ending in such taxable year, and such individual shall be treated for purposes of this title as a citizen or resident of the United States, as the case may be, for such taxable year.
An individual is described in this subparagraph if, for each year in the 10-year period ending on the date of loss of United States citizenship or termination of residency, the individual was physically present in the United States for 30 days or less. The rule of section 7701(b)(3)(D) shall apply for purposes of this subparagraph.
This section shall not apply to any individual whose expatriation date (as defined in section 877A(g)(3)) is on or after the date of the enactment of this subsection.