If the plaintiff claim only an estate for life in the land recovered, and pay any sum allowed to the defendant for improvements, he, or his personal representative at the determination of his estate, may recover from the remainderman or reversioner, the value of such improvements as they then exist, not exceeding the amount so paid by him, and shall have a lien therefor on the premises, in like manner as if they had been mortgaged for the payment thereof, and may keep possession of such premises until the same be paid.
Va. Code § 8.01-173