The amount of the withholding tax payable by any partnership under subsection (a) shall be equal to the applicable percentage of the effectively connected taxable income of the partnership which is allocable under section 704 to foreign partners.
Each foreign partner of a partnership shall be allowed a credit under section 33 for such partner’s share of the withholding tax paid by the partnership under this section. Such credit shall be allowed for the partner’s taxable year in which (or with which) the partnership taxable year (for which such tax was paid) ends.
For purposes of this section, the term “foreign partner” means any partner who is not a United States person.
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.
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.
The rules of section 1445(d) shall apply to a transferor’s agent or transferee’s agent with respect to any affidavit described in subparagraph (A) in the same manner as such rules apply with respect to the disposition of a United States real property interest under such section.
At the request of the transferor or transferee, the Secretary may prescribe a reduced amount to be withheld under this section if the Secretary determines that to substitute such reduced amount will not jeopardize the collection of the tax imposed under this title with respect to gain treated under section 864(c)(8) as effectively connected with the conduct of a trade or business with in the United States.
If a transferee fails to withhold any amount required to be withheld under paragraph (1), the partnership shall be required to deduct and withhold from distributions to the transferee a tax in an amount equal to the amount the transferee failed to withhold (plus interest under this title on such amount).
Any term used in this subsection which is also used under section 1445 shall have the same meaning as when used in such section.