afterwards drew up the opinion of the Court. The only question is, whether the defendant, William Richards the younger, is entitled to the claim of betterments, under the statute. By St. 1807, c. 75, § 3, extended by St. 1819, c. 144, to subsequent and accruing cases, persons holding by virtue of a possession and improvement, and which the tenant or person under whom he claims, has had in actual possession, for the term of six years or more, before the commencement of the action, shall be entitled, in the mode prescribed, to the value of his improvements.
This statute was no doubt originally intended to apply to ■ those, who had entered upon uncultivated land, without title or color of title, and held more than six years and made valuable improvements. But it was early held, that the statute extended to those who entered under a colorable title believed to be good, but which upon investigation, and action brought, has been found to be invalid. Bacon v. Callender, 6 Mass. R. 303. This is no doubt within the equity, if not within the letter of the statute. Because, when the title is found to be invalid, the effect of the judgment is to show that it was bad from the beginning, and so the tenant, whatever may have been his belief at the time, has in fact held by virtue of a possession.
But the case necessarily supposes, that the tenant has an actual possession, and has had it for the required term, bj himself, or those under whom he claims, adverse to him who ultimately recovers by a paramount title, or to those under whom he claims. This results from the terms, “ holding by virtue of a possession,” and “. having had actual possession,” as used in the statute. If* the tenant has had the occupation, by hire, contract or tenancy, under the owner who subsequently recovers, the possession of the tenant is legally the possession of the owner, under whom he holds, and he cannot be said, to hold by possession. So it was held in Knox v. Hook, 12 Mass. R. 329, where the tenant entered under an agreement with the owner for a purchase, which was never completed, and in pursuance of which therefore no deed was *143given The tenant being let into possession under the agreement, xvas the tenant of the owner, either at will or for years, according to the nature of the agreement. But the holding being under, and not adversely to the owner, although continued long beyond the term of six years, it was determined that the tenant could not sustain his claim to the value of his improvements, under the statute.
There is a strong reason for adopting this construction, independently of the particular phraseology of the statute, in this, that when one has come into possession by license or contract, the relative rights and obligations of the parties may be adjusted, and in legal contemplation are taken to be adjusted and regulated by the terms of the contract.
In the present case, the facts show, that William Richards the elder and his wife, were seised of the premises in her right, and so continued till her decease, within two years before the action. If the defendant, William Richards the younger, can be said to have had any possession, during their lives, of which we have much doubt, it was entirely under and not adversely to the title of Richards the elder, and his wife, until her decease. The defendant lived with his uncle and aunt, and superintended the farm, and,made the improvements under an expectation, that he was to have the estate by devise after the death of the wife. Such a will was in fact made, but was inoperative, and the devise failed.
Considering therefore, that prior to the death of the wife of Richards the elder, the possession of the defendant, if any he bad, was under and not adverse to that -of the owner, and that since her decease, his possession has not continued six years, we are of opinion that he has not held by virtue of a possession, according to the statute, so as to entitle him to the value of his improvements