In the case of an individual, a loss shall be taken into account under subsection (a) only to the extent such loss would be taken into account under section 165(c) (determined without regard to subsection (a) of this section).
If any class of stock of a corporation is regularly traded on an established securities market, stock of such class shall be treated as a United States real property interest only in the case of a person who, at some time during the shorter of the periods described in paragraph (1)(A)(ii), held more than 5 percent of such class of stock.
Paragraph (1)(A)(ii) shall be applied by substituting “any corporation (whether foreign or domestic)” for “any domestic corporation”.
Under regulations prescribed by the Secretary, assets held by a partnership, trust, or estate shall be treated as held proportionately by its partners or beneficiaries. Any asset treated as held by a partner or beneficiary by reason of this subparagraph which is used or held for use by the partnership, trust, or estate in a trade or business shall be treated as so used or held by the partner or beneficiary. Any asset treated as held by a partner or beneficiary by reason of this subparagraph shall be so treated for purposes of applying this subparagraph successively to partnerships, trusts, or estates which are above the first partnership, trust, or estate in a chain thereof.
For purposes of subparagraph (A), the term “controlling interest” means 50 percent or more of the fair market value of all classes of stock of a corporation.
The term “interest in real property” includes fee ownership and co-ownership of land or improvements thereon, leaseholds of land or improvements thereon, options to acquire land or improvements thereon, and options to acquire leaseholds of land or improvements thereon.
The term “real property” includes movable walls, furnishings, and other personal property associated with the use of the real property.
For purposes of determining under paragraph (3) whether any person holds more than 5 percent of any class of stock and of determining under paragraph (5) whether a person holds a controlling interest in any corporation, section 318(a) shall apply (except that paragraphs (2)(C) and (3)(C) of section 318(a) shall be applied by substituting “5 percent” for “50 percent”).
Except to the extent otherwise provided in regulations, notwithstanding any other provision of this chapter, gain shall be recognized by a foreign corporation on the distribution (including a distribution in liquidation or redemption) of a United States real property interest in an amount equal to the excess of the fair market value of such interest (as of the time of the distribution) over its adjusted basis.
Except to the extent otherwise provided in subsection (d) and paragraph (2) of this subsection, any nonrecognition provision shall apply for purposes of this section to a transaction only in the case of an exchange of a United States real property interest for an interest the sale of which would be subject to taxation under this chapter.
For purposes of this subsection, the term “nonrecognition provision” means any provision of this title for not recognizing gain or loss.
Under regulations prescribed by the Secretary, the amount of any money, and the fair market value of any property, received by a nonresident alien individual or foreign corporation in exchange for all or part of its interest in a partnership, trust, or estate shall, to the extent attributable to United States real property interests, be considered as an amount received from the sale or exchange in the United States of such property.
Any distribution by a qualified investment entity to a nonresident alien individual, a foreign corporation, or other qualified investment entity shall, to the extent attributable to gain from sales or exchanges by the qualified investment entity of United States real property interests, be treated as gain recognized by such nonresident alien individual, foreign corporation, or other qualified investment entity from the sale or exchange of a United States real property interest. Notwithstanding the preceding sentence, any distribution by a qualified investment entity to a nonresident alien individual or a foreign corporation with respect to any class of stock which is regularly traded on an established securities market located in the United States shall not be treated as gain recognized from the sale or exchange of a United States real property interest if such individual or corporation did not own more than 5 percent of such class of stock at any time during the 1-year period ending on the date of such distribution.
The term “United States real property interest” does not include any interest in a domestically controlled qualified investment entity.
In the case of a domestically controlled qualified investment entity, rules similar to the rules of subsection (d) shall apply to the foreign ownership percentage of any gain.
The term “domestically controlled qualified investment entity” means any qualified investment entity in which at all times during the testing period less than 50 percent in value of the stock was held directly or indirectly by foreign persons.
The term “foreign ownership percentage” means that percentage of the stock of the qualified investment entity which was held (directly or indirectly) by foreign persons at the time during the testing period during which the direct and indirect ownership of stock by foreign persons was greatest.
If an interest in a domestically controlled qualified investment entity is disposed of in an applicable wash sale transaction, the taxpayer shall, for purposes of this section, be treated as having gain from the sale or exchange of a United States real property interest in an amount equal to the portion of the distribution described in subparagraph (B) with respect to such interest which, but for the disposition, would have been treated by the taxpayer as gain from the sale or exchange of a United States real property interest under paragraph (1).
A transaction shall not be treated as an applicable wash sales transaction if the nonresident alien individual, foreign corporation, or qualified investment entity receives the distribution described in clause (i)(I) with respect to either the interest which was disposed of, or acquired, in the transaction.
A transaction shall not be treated as an applicable wash sales transaction if it involves the disposition of any class of stock in a qualified investment entity which is regularly traded on an established securities market within the United States but only if the nonresident alien individual, foreign corporation, or qualified investment entity did not own more than 5 percent of such class of stock at any time during the 1-year period ending on the date of the distribution described in clause (i)(I).
Any election under paragraph (1), once made, may be revoked only with the consent of the Secretary.
In the case of any disposition of stock in a real estate investment trust, paragraphs (3) and (6)(C) of subsection (c) shall each be applied by substituting “more than 10 percent” for “more than 5 percent”.
For purposes of subparagraphs (B)(i) and (D), the constructive ownership rules under subsection (c)(6)(C) shall apply.
For purposes of subparagraph (B), the term “applicable percentage” means the percentage of the value of the interests (other than interests held solely as a creditor) in the qualified shareholder held by applicable investors.
For purposes of this paragraph, an applicable investor’s proportionate share of USRPI gain shall be determined on the basis of such investor’s share of partnership items of income or gain (excluding gain allocated under section 704(c)), whichever results in the largest proportionate share. If the investor’s share of partnership items of income or gain (excluding gain allocated under section 704(c)) may vary during the period such investor is a partner in the partnership, such share shall be the highest share such investor may receive.
For purposes of this section, a qualified foreign pension fund shall not be treated as a nonresident alien individual or a foreign corporation. For purposes of the preceding sentence, an entity all the interests of which are held by a qualified foreign pension fund shall be treated as such a fund.