In an action arising under or in relation to a contract for the conveyance of real estate or any interest therein, the district court, notwithstanding the service or publication pursuant to the provisions of section 559.21 of a notice of termination of the contract, has the authority at any time prior to the effective date of termination of the contract and subject to the requirements of rule 65 of the Rules of Civil Procedure for the District Courts to enter an order temporarily restraining or enjoining further proceedings to effectuate the termination of the contract, including recording of the notice of termination with proof of service, recording of an affidavit showing noncompliance with the terms of the notice, taking any action to recover possession of the real estate, or otherwise interfering with the purchaser's lawful use of the real estate. In the action, the purchaser may plead affirmatively any matter that would constitute a defense to an action to terminate the contract. Upon a motion for a temporary restraining order the court has the discretion, notwithstanding any rule of court to the contrary, to grant the order without requiring the giving of any security or undertaking, and in exercising that discretion, the court shall consider, as one factor, the moving party's ability to afford monetary security. Upon a motion for a temporary injunction, the court shall condition the granting of the order either upon the tender to the court or vendor of installments as they become due under the contract or upon the giving of other security in a sum as the court deems proper. Upon written application, the court may disburse from payments tendered to the court an amount the court determines necessary to insure the timely payment of property taxes, property insurance, installments of special assessments, mortgage installments, prior contract for deed installments or other similar expenses directly affecting the real estate, or for any other purpose the court deems just. If a temporary restraining order or injunction is granted pursuant to this subdivision, the contract shall not terminate until the expiration of 15 days after the entry of the order or decision dissolving or modifying the temporary restraining order or injunction.
The remedies provided in this section are in addition to and do not limit other rights or remedies available to purchasers or vendors of real estate.
This section is applicable to contracts for the conveyance of real estate or any interest therein executed before, on and after May 1, 1980.