§ 679. Foreign trusts having one or more United States beneficiaries

(a) Transferor treated as owner
(1) In general
A United States person who directly or indirectly transfers property to a foreign trust (other than a trust described in section 6048 (a)(3)(B)(ii)) shall be treated as the owner for his taxable year of the portion of such trust attributable to such property if for such year there is a United States beneficiary of any portion of such trust.
(2) Exceptions
Paragraph (1) shall not apply—
(A) Transfers by reason of death
To any transfer by reason of the death of the transferor.
(B) Transfers at fair market value
To any transfer of property to a trust in exchange for consideration of at least the fair market value of the transferred property. For purposes of the preceding sentence, consideration other than cash shall be taken into account at its fair market value.
(3) Certain obligations not taken into account under fair market value exception
(A) In general
In determining whether paragraph (2)(B) applies to any transfer by a person described in clause (ii) or (iii) of subparagraph (C), there shall not be taken into account—
(i) except as provided in regulations, any obligation of a person described in subparagraph (C), and
(ii) to the extent provided in regulations, any obligation which is guaranteed by a person described in subparagraph (C).
(B) Treatment of principal payments on obligation
Principal payments by the trust on any obligation referred to in subparagraph (A) shall be taken into account on and after the date of the payment in determining the portion of the trust attributable to the property transferred.
(C) Persons described
The persons described in this subparagraph are—
(i) the trust,
(ii) any grantor, owner, or beneficiary of the trust, and
(iii) any person who is related (within the meaning of section 643 (i)(2)(B)) to any grantor, owner, or beneficiary of the trust.
(4) Special rules applicable to foreign grantor who later becomes a United States person
(A) In general
If a nonresident alien individual has a residency starting date within 5 years after directly or indirectly transferring property to a foreign trust, this section and section 6048 shall be applied as if such individual transferred to such trust on the residency starting date an amount equal to the portion of such trust attributable to the property transferred by such individual to such trust in such transfer.
(B) Treatment of undistributed income
For purposes of this section, undistributed net income for periods before such individual’s residency starting date shall be taken into account in determining the portion of the trust which is attributable to property transferred by such individual to such trust but shall not otherwise be taken into account.
(C) Residency starting date
For purposes of this paragraph, an individual’s residency starting date is the residency starting date determined under section 7701 (b)(2)(A).
(5) Outbound trust migrations
If—
(A) an individual who is a citizen or resident of the United States transferred property to a trust which was not a foreign trust, and
(B) such trust becomes a foreign trust while such individual is alive,
then this section and section 6048 shall be applied as if such individual transferred to such trust on the date such trust becomes a foreign trust an amount equal to the portion of such trust attributable to the property previously transferred by such individual to such trust. A rule similar to the rule of paragraph (4)(B) shall apply for purposes of this paragraph.
(b) Trusts acquiring United States beneficiaries
If—
(1) subsection (a) applies to a trust for the transferor’s taxable year, and
(2) subsection (a) would have applied to the trust for his immediately preceding taxable year but for the fact that for such preceding taxable year there was no United States beneficiary for any portion of the trust,
then, for purposes of this subtitle, the transferor shall be treated as having income for the taxable year (in addition to his other income for such year) equal to the undistributed net income (at the close of such immediately preceding taxable year) attributable to the portion of the trust referred to in subsection (a).
(c) Trusts treated as having a United States beneficiary
(1) In general
For purposes of this section, a trust shall be treated as having a United States beneficiary for the taxable year unless—
(A) under the terms of the trust, no part of the income or corpus of the trust may be paid or accumulated during the taxable year to or for the benefit of a United States person, and
(B) if the trust were terminated at any time during the taxable year, no part of the income or corpus of such trust could be paid to or for the benefit of a United States person.
For purposes of subparagraph (A), an amount shall be treated as accumulated for the benefit of a United States person even if the United States person’s interest in the trust is contingent on a future event.
(2) Attribution of ownership
For purposes of paragraph (1), an amount shall be treated as paid or accumulated to or for the benefit of a United States person if such amount is paid to or accumulated for a foreign corporation, foreign partnership, or foreign trust or estate, and—
(A) in the case of a foreign corporation, such corporation is a controlled foreign corporation (as defined in section 957 (a)),
(B) in the case of a foreign partnership, a United States person is a partner of such partnership, or
(C) in the case of a foreign trust or estate, such trust or estate has a United States beneficiary (within the meaning of paragraph (1)).
(3) Certain United States beneficiaries disregarded
A beneficiary shall not be treated as a United States person in applying this section with respect to any transfer of property to foreign trust if such beneficiary first became a United States person more than 5 years after the date of such transfer.
(4) Special rule in case of discretion to identify beneficiaries
For purposes of paragraph (1)(A), if any person has the discretion (by authority given in the trust agreement, by power of appointment, or otherwise) of making a distribution from the trust to, or for the benefit of, any person, such trust shall be treated as having a beneficiary who is a United States person unless—
(A) the terms of the trust specifically identify the class of persons to whom such distributions may be made, and
(B) none of those persons are United States persons during the taxable year.
(5) Certain agreements and understandings treated as terms of the trust
For purposes of paragraph (1)(A), if any United States person who directly or indirectly transfers property to the trust is directly or indirectly involved in any agreement or understanding (whether written, oral, or otherwise) that may result in the income or corpus of the trust being paid or accumulated to or for the benefit of a United States person, such agreement or understanding shall be treated as a term of the trust.
(6) Uncompensated use of trust property treated as a payment
For purposes of this subsection, a loan of cash or marketable securities (or the use of any other trust property) directly or indirectly to or by any United States person (whether or not a beneficiary under the terms of the trust) shall be treated as paid or accumulated for the benefit of a United States person. The preceding sentence shall not apply to the extent that the United States person repays the loan at a market rate of interest (or pays the fair market value of the use of such property) within a reasonable period of time.
(d) Presumption that foreign trust has United States beneficiary
If a United States person directly or indirectly transfers property to a foreign trust (other than a trust described in section 6048 (a)(3)(B)(ii)), the Secretary may treat such trust as having a United States beneficiary for purposes of applying this section to such transfer unless such person—
(1) submits such information to the Secretary as the Secretary may require with respect to such transfer, and
(2) demonstrates to the satisfaction of the Secretary that such trust satisfies the requirements of subparagraphs (A) and (B) of subsection (c)(1).
(e) Regulations
The Secretary shall prescribe such regulations as may be necessary or appropriate to carry out the purposes of this section.