No gain or loss shall be recognized on a transfer of property from an individual to (or in trust for the benefit of)—
(1) a spouse, or
(2) a former spouse, but only if the transfer is incident to the divorce.
In the case of any transfer of property described in subsection (a)—
(1) for purposes of this subtitle, the property shall be treated as acquired by the transferee by gift, and
(2) the basis of the transferee in the property shall be the adjusted basis of the transferor.
For purposes of subsection (a)(2), a transfer of property is incident to the divorce if such transfer—
(1) occurs within 1 year after the date on which the marriage ceases, or
(2) is related to the cessation of the marriage.
Subsection (a) shall not apply if the spouse (or former spouse) of the individual making the transfer is a nonresident alien.
Subsection (a) shall not apply to the transfer of property in trust to the extent that—
(1) the sum of the amount of the liabilities assumed, plus the amount of the liabilities to which the property is subject, exceeds
(2) the total of the adjusted basis of the property transferred.
(Added Pub. L. 98–369, div. A, title IV, § 421(a), July 18, 1984, 98 Stat. 793; amended Pub. L. 99–514, title XVIII, § 1842(b), Oct. 22, 1986, 100 Stat. 2853; Pub. L. 100–647, title I, § 1018(l)(3), Nov. 10, 1988, 102 Stat. 3584.)