If he lived there for 27 years without paying rent, he could have filed a deed on the place.
Although many other states have put adverse possession into their statutes, New Hampshire has not, and it is in case law – which is as authoritative and binding as statutory law - that you will find most of the elements that must be proven in court.
The elements of adverse possession are:
the use must be adverse (without permission and hostile to the owner’s interests);
it must be notorious (the owner has had notice of the use);
it must be continuous and uninterrupted; it must be exclusive (not in common with neighbors, or others),
and it must be for a period of at least 20 years as defined in the statute of limitations for the recovery of real property (see RSA 508:2, I).
Adverse possession applies only to private property, not to public lands, waters, highways or transmission lines
see my post #25