26 CFR § 1.166-6 - Sale of mortgaged or pledged property.
(a) Deficiency deductible as bad debt -
(1) Principal amount. If mortgaged or pledged property is lawfully sold (whether to the creditor or another purchaser) for less than the amount of the debt, and the portion of the indebtedness remaining unsatisfied after the sale is wholly or partially uncollectible, the mortgagee or pledgee may deduct such amount under section 166(a) (to the extent that it constitutes capital or represents an item the income from which has been returned by him) as a bad debt for the taxable year in which it becomes wholly worthless or is charged off as partially worthless. See § 1.166-3.
(b) Realization of gain or loss -
(1) Determination of amount. If, in the case of a sale described in paragraph (a) of this section, the creditor buys in the mortgaged or pledged property, loss or gain is also realized, measured by the difference between the amount of those obligations of the debtor which are applied to the purchase or bid price of the property (to the extent that such obligations constitute capital or represent an item the income from which has been returned by the creditor) and the fair market value of the property.
(2) Fair market value defined. The fair market value of the property for this purpose shall, in the absence of clear and convincing proof to the contrary, be presumed to be the amount for which it is bid in by the taxpayer.
(c) Basis of property purchased. If the creditor subsequently sells the property so acquired, the basis for determining gain or loss upon the subsequent sale is the fair market value of the property at the date of its acquisition by the creditor.
(d) Special rules applicable to certain banking organizations. For special rules relating to the treatment of mortgaged or pledged property by certain mutual savings banks, domestic building and loan associations, and cooperative banks, see section 595 and the regulations thereunder.
(e) Special rules applicable to certain reacquisitions of real property. Notwithstanding this section, special rules apply for taxable years beginning after September 2, 1964 (and for certain taxable years beginning after December 31, 1957), to the gain or loss on certain reacquisitions of real property, to indebtedness remaining unsatisfied as a result of such reacquisitions, and to the basis of the reacquired real property. See §§ 1.1038-1 through 1.1038-3.