In an action for the recovery of real property, when the plaintiff shows a right to recover at the time the action was commenced, but it appears that such right has terminated during the pendency of the action, the verdict and judgment shall be according to the fact, and the plaintiff may recover damages for withholding the property.
Minn. Stat. § 559.06
(9561) RL s 4429