Subsection (a) shall not apply
(1) to the disclosure of tax convention information to persons or authorities (including courts and administrative bodies) which are entitled to such disclosure pursuant to a tax convention,
(2) to any generally applicable procedural rules regarding applications for relief under a tax convention,
to the disclosure of tax convention information on the same terms as return information may be disclosed under paragraph (3)(C) or (7) of section 6103 (i)
, except that in the case of tax convention information provided by a foreign government, no disclosure may be made under this paragraph without the written consent of the foreign government, or
(4) in any case not described in paragraph (1), (2), or (3), to the disclosure of any tax convention information not relating to a particular taxpayer if the Secretary determines, after consultation with each other party to the tax convention, that such disclosure would not impair tax administration.
For purposes of this section
(1) Tax convention information
The term tax convention information means any
(A) agreement entered into with the competent authority of one or more foreign governments pursuant to a tax convention,
(B) application for relief under a tax convention,
(C) background information related to such agreement or application,
(D) document implementing such agreement, and
(E) other information exchanged pursuant to a tax convention which is treated as confidential or secret under the tax convention.
(2) Tax convention
The term tax convention means
(A) any income tax or gift and estate tax convention, or
(B) any other convention or bilateral agreement (including multilateral conventions and agreements and any agreement with a possession of the United States) providing for the avoidance of double taxation, the prevention of fiscal evasion, nondiscrimination with respect to taxes, the exchange of tax relevant information with the United States, or mutual assistance in tax matters.