5. “Transfer” means the transfer or conveyance by sale, exchange, real estate contract, or any other method by which real estate and improvements
are purchased, if the property includes at least one but not more than four dwelling units. However, a transfer does not include
any of the following: a. A transfer made pursuant to a court order, including but not limited to a transfer under chapter 633 or 633A, the execution of a judgment, the foreclosure of a real estate mortgage pursuant to chapter 654, the forfeiture of a real estate contract under chapter 656, a transfer by a trustee in bankruptcy, a transfer by eminent domain, or a transfer resulting from a decree for specific
performance.
b. A transfer to a mortgagee by a mortgagor or successor in interest who is in default, a transfer by a mortgagee who has acquired
real property as a result of a deed in lieu of foreclosure or has acquired real property under chapter 654 or 655A, or a transfer back to a mortgagor exercising a right of first refusal pursuant to section 654.16A.
c. A transfer by a fiduciary in the course of the administration of a decedent’s estate, guardianship, conservatorship, or trust.
This exemption shall not apply to a transfer of real estate in which the fiduciary is a living natural person and was an occupant
in possession of the real estate at any time within the twelve consecutive months immediately preceding the date of transfer.
d. A transfer between joint tenants or tenants in common.
e. A transfer made to a spouse, or to a person within the third degree of consanguinity or affinity of a person making the transfer.
f. A transfer between spouses resulting from a decree of dissolution of marriage, a decree of legal separation, or a property
settlement agreement which is incidental to the decree, including a decree ordered pursuant to chapter 598.
g. A transfer to or from the state, a political subdivision of the state, another state, or the United States.
h. A transfer by quitclaim deed.
i. A transfer by a power of attorney.