When the jury shall find a verdict for the plaintiff in such action, they shall also find the value of the improvements in favor of the defendant or tenant in possession, proved in the manner aforesaid, and further shall find the amount of the mesne profits proved to have accrued as aforesaid, as also the value of the land in its natural state without the improvements, and if the value of the improvements should exceed the amount of the mesne profits, the balance or overplus thereof shall be found by the jury in favor of the defendant or tenant in possession, and such plaintiff or plaintiffs shall not have a writ of possession awarded or issued against the defendant or defendants until he or they shall have paid to the said defendant or defendants, their agent or attorney, the full amount of balance or overplus, which the value of the improvements is found to exceed the mesne profits as aforesaid. And if the mesne profits as aforesaid shall exceed the value of the improvements as aforesaid, the jury aforesaid shall find the amount of such balance or overplus against the defendant or tenant in possession and judgment shall be entered up against said defendant or tenant in possession for such balance or overplus so found against them.
NMS § 42-4-15