United States real property interest under section 897. (D) Sale or exchange For purposes of this paragraph, an individual or corporation shall be treated as having sold or exchanged any interest in a partnership if, under any provision of this subtitle, gain or loss is realized from the sale or exchange of such interest. (E) Secretarial authority The Secretary shall prescribe such regulations as the Secretary determines appropriate for the application of this paragraph, including regulations which provide that, notwithstanding subparagraph (D), this paragraph applies in a case even if gain or loss from a sale or exchange would not be realized under any other provision of this subtitle. . (b) Withholding requirements Section 1446 is amended by redesignating subsection (f) as subsection (g) and by inserting after subsection (e) the following: (f) Special rules for withholding on sales of partnership interests (1) In general Except as provided in this subsection, if any portion of the gain (if any) on any disposition of an interest in a partnership would be treated under section 864(c)(8) as effectively connected with the conduct of a trade or business within the United States, the transferee shall be required to deduct and withhold a tax equal to 10 percent of the amount realized on the disposition. (2) Exception if nonforeign affidavit furnished (A) In general No person shall be required to deduct and withhold any amount under paragraph (1) with respect to any disposition if the transferor furnishes to the transferee an affidavit by the transferor stating, under penalty of perjury, the transferor’s United States taxpayer identification number and that the transferor is not a foreign person. (B) False affidavit Subparagraph (A) shall not apply to any disposition if— (i) the transferee has actual knowledge that the affidavit is false, or the transferee receives a notice (as described in section 1445(d)) from a transferor’s agent or transferee’s agent that such affidavit or statement is false, or (ii) the Secretary