When any person claiming possession may have made, or may hereafter make, any valuable improvements on any land in this state, and any other person shall have taken, or may hereafter, in any manner, take from him or his assignor or assigns the possession of such improvements, or any part thereof, the person so taking possession shall be liable for the full value of such improvements so taken possession of, to the person who made the same, or to whom they may have been assigned: provided, the said possession and improvements shall not have been abandoned by the said person making the same, or those holding or claiming through him, for a greater period than six months immediately prior to so taking the possession thereof, and the value of said improvements shall be a lien upon the said improvements and the land in which they are situate until paid; as also upon all other real estate of the person so taking possession thereof situate in the same county.
NMS § 42-4-18