This is a petition for the registration of title to land. It was appealed from the Land Court to the Superior Court, where it was tried to a jury upon four issues. The case was brought before this court on exceptions, and there was found to be no error of law in the trial of three of these issues, but as to the other issue exceptions were sustained and a new trial was ordered confined to that issue. 218 Mass. 448. The material dates and facts respecting the chain of title are these: On April 1, 1896, the respondent Williams acquired title to the locus by a deed which was duly recorded. He retained that title until July 5, 1901, when he conveyed the land to one Jones by a deed duly recorded; on the same date he took a deed back from Jones to himself, which was not recorded until March, 1908. Meanwhile, on May 24, 1906, while the record title stood in the name of Jones, one Duckrey brought an action against Jones and attached the locus, which was sold on execution sale to the petitioner, and a sheriff’s deed thereof to him dated April 10, 1909, was duly recorded. The petitioner alleges that he is the owner of the land by reason of this sheriff’s deed. The respondent pleaded that he was owner by virtue of his deed of April 1, 1896, and of the deed from Jones. The previous trial resulted in findings that Williams protested at *469the execution sale, and that the petitioner, before his purchase at the execution sale, was informed that the beneficial interest was in Williams and that Jones had a bare record title. The single question submitted at the last trial was this: “Did James H. Duckrey, before his attachment of the property in question, have actual knowledge of the existence of the deed back from Jones to Williams of July 5, 1901?” The presiding judge ruled that the burden of proof was on the petitioner to satisfy the jury that Duckrey did not have such knowledge. The point now presented for decision is the correctness of that ruling.
It is provided by R. L. c. 127, § 4, that “A conveyance of an estate in fee simple . . . shall not be valid as against any person, except the grantor ... his heirs and devisees and persons having actual notice of it” unless it is recorded.
The burden of proving that he was entitled to the registration of the title to the premises rested upon the petitioner, and remained upon him throughout. Temple v. Benson, 213 Mass. 128, 132. Hughes v. Williams, 218 Mass. 448, 449.
The petitioner’s title appeared to be perfect on the record. It could be defeated only provided that Duckrey, the attaching creditor in the action against Jones, had actual knowledge of the unrecorded deed from his debtor, Jones, to the respondent, and provided it appeared further that the petitioner himself at the time of his purchase also had such actual knowledge. The respondent did not attack the sufficiency of the petitioner’s title on the record, nor did he assail the validity of any instrument through which the petitioner claimed title; but he asserted title in himself. On the strength of facts which he alleged existed outside the record, namely, actual knowledge by Duckrey at the time of making his attachment of the existence of the deed to himself and actual knowledge by the petitioner of the same fact at the time of his purchase. If these were the facts, the respondent was entitled to prevail under the terms of the statutes. Wenz v. Pastene, 209 Mass. 359. But this assertion by the respondent was in the nature of a confession of the record title of the petitioner and an avoidance of its natural force and effect by the existence of extraneous facts, which as matter of common honesty and under the statute would prevent the petitioner from taking advantage of his clear record title.
*470The statement of the legal principle where the burden of proof rests is plain. The party who makes and is required to make an assertion of a fact in order to set forth a case as matter of law entitling him to prevail, and whose case requires the proof of that fact, has at all times the burden of proving such fact. But where the party upon whom the burden of proof is cast offers competent proof of that fact, and his adversary instead of producing proof to negative that same fact proposes to show another and a distinct fact which avoids the effect of the first fact, then the burden of proof rests upon the party proposing to show the latter fact. This is an affirmative defence, the burden of proving which rests upon the party asserting it. Powers v. Russell, 13 Pick. 69, 76, 77. Wylie v. Marinofsky, 201 Mass. 583, 584. Wood v. Blanchard, 212 Mass. 53, 56. Stocker v. Foster, 178 Mass. 591, 600, 601. Parker v. Murphy, 215 Mass. 72, 75.
The practical application of the rule oftentimes raises questions of difficulty. Several cases have arisen where the burden of proof of the “actual notice” mentioned in the statute has been referred to. In Pomroy v. Stevens, 11 Met. 244, at page 248, it was said “the party relying on an unregistered deed, against a subsequent purchaser or attaching creditor, must prove that the latter had actual notice or knowledge of such deed.” In Dooley v. Wolcott, 4 Allen, 406, the trial judge instructed the jury that it was incumbent upon the tenant, who relied upon an unrecorded deed, to prove that the demandant had actual notice of it, and it was said at page 409, “Upon the question of notice to the demandant of the tenant’s prior unrecorded deed, and as to the right of the tenant to maintain his title thereby, the court properly instructed the jury.” In Lamb v. Pierce, 113 Mass. 72, the defendant relied upon an unrecorded deed. It was said, at page 74, "this statute requires that the plaintiff must be shown to have had actual notice that there had been a conveyance to the defendant of the estate . . . the party who claims under an unrecorded deed must prove that the subsequent purchaser had actual knowledge or notice of such deed.” In all these cases as they were presented the burden was upon the tenant in a real action, or upon the defendant in an action of trespass, and hence what has been quoted from these opinions is precisely applicable to the case at bar. It also is said in Jackson on Real Actions, page 158, “If the defendant ... *471undertakes to show a better title in himself, he then becomes actor, and must show his title with the same certainty that was before required of the plaintiff.”
The case is somewhat analogous to insurance policies, where the burden of showing that death or accident resulted from excepted or prohibited risks added to the main contract by way of proviso rests upon the insurer. Nichols v. Commercial Travellers’ Eastern Accident Association, 221 Mass. 540, and cases collected at page 546. It is not unlike the classification of goods as inflammable under exceptions in a bill of lading, the burden of proving which rests upon the carrier. A. J. Tower Co. v. Southern Pacific Co. 184 Mass. 472. It is distinguishable from cases arising under the negotiable instruments act, where by the statute the burden of proving want of notice of infirmity in a note is cast upon the holder, Phillips v. Eldridge, 221 Mass. 103, and from cases where the matter of defence, though apparently somewhat special, really strikes at the root of a fact essential to the support of the plaintiff’s case. Central Bridge Corp. v. Butler, 2 Gray, 130. Sohier v. Norwich Fire Ins. Co. 11 Allen, 336, 338. Cohen v. Longarini, 207 Mass. 556. The case at bar also is distinguishable from the decision as to waiver of his rights by the respondent or estoppel against asserting them, the burden of proving which was held when the case was here before to be upon the petitioner. That was an affirmative issue, and the burden rested upon the one who set it up, namely, upon the petitioner.
The result is that the burden of proving the issue in the case at bar rested upon the respondent.
Exceptions sustained,.