26 CFR § 301.7701(b)-5 - Coordination with section 877.
(a) General rule. An alien individual will be subject to United States income tax in the manner provided by section 877, regardless of whether the individual has a tax avoidance motive, if—
(1) The alien individual is a resident alien of the United States for at least three consecutive calendar years (the initial residency period) beginning after December 31, 1984;
(2) The period of residence for each of the three consecutive calendar years includes at least 183 days;
(3) The alien is once again taxed as a nonresident (including an individual taxed as a nonresident) under § 301.7701(b)-7(a)(1); and
(4) The alien then becomes a resident of the United States before the close of the third calendar year beginning after the individual's residency termination date in the initial residency period.
(b) Tax imposed. The tax provided for under paragraph (a) of this section will be imposed for the intervening period of nonresidency only if the amount of tax would exceed the amount of tax that would be imposed under section 871, relating to the taxation of nonresident aliens.
(c) Example. The following example illustrates the application of this section.