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.
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.
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.
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.
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.
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.
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.
The Secretary shall prescribe such regulations as may be necessary or appropriate to carry out the purposes of this section.