
    Crary against Goodman.
    In an action to recover the possession of land, founded upon the legal title held by the plaintiff, the defendant may allege and prove, as a defence, that he is equitably the owner of the premises and entitled to a conveyance thereof.
    Action to recover possession of a parcel of land situate in Cattaraugus county, commenced in December, 1848. The cause was tried in January, 1850, before Mr. Justice Hoyt. The plaintiff proved that he had the legal title to the premises in controversy. The defendant proved that lie occupied the premises as tenant under one Huntley, and that they were adjacent to other lands owned by the latter; and he alleged in his answer, and offered to prove upon the trial, facts tending to show that the land in dispute was included in the purchase, by Huntley, of the adjacent premises from the plaintiff’s grantors, and that by a mutual mistake of the parties, it was not included in the conveyance thereof; and that in equity Huntley was entitled, as against the plaintiff and his grantors, to a conveyance of the premises, the possession of which was in controversy. To this evidence the counsel for the plaintiff objected; and the justice decided that no equitable defence could be interposed in this action to the plaintiff’s right to recover upen the legal title, and rejected the evidence; the counsel for the defendant excepted. A verdict was rendered in favor of the plaintiff. From the judgment entered on this verdict the defendant appealed. The case was heard on the appeal at a general term of the supreme court in the 8th district, and the judgment affirmed. (See 9 Barbour, 657.) The defendant appealed to this court. The case was submitted on printed briefs.
    
      Rice & Cobb, for the appellant.
    
      D. R. Wheeler, for the respondent.
   Johnson, J.,

delivered the opinion of the court.

The principal ground on which this case was disposed of at the trial was, that in an action to recover real property brought under the Code of 1848, when the plaintiff’s claim is founded upon a legal title, the defendant cannot avail himself of an equitable right to defeat that title by way of defence in the suit. This, likewise, was the single ground upon which the judgment at the trial was affirmed at general term. (9 Barb., 657.) Although much difference of opinion has existed in the different courts of this state in regard to the effect of the Code of Procedure in this particular, the question has been adjudged in this court (Dobson v. Pearce, ante, 156); and it is now neither necessary nor proper to discuss it. In the case cited, which was an action upon a judgment, the superior court of the city of New-York allowed, as a defence to the action, facts which made out a right in the defendant to relief upon equitable grounds against the judgment, but which confessedly would not have been available as a defence to the action at law, before the Code. The case arose and was tried in the superior court, before the amendments to the Code passed in 1852; one of which provides, in express terms, that the defendant may set up as many defences as he has, whether they are such as have been theretofore denominated legal or equitable, or both. This judgment \yas affirmed in this court upon the ground, that since the enactment of the Code, .which in terms -abolishes the distinction between actions at law and suits in equity, and prescribes but a single form of civil action, the question in an action is not whether the plaintiff has a legal right or an equitable right, or the defendant a legal or an equitable defence against the plaintiff’s claim; but whether, according to the whole law of the land, applicable to the case, the plaintiff makes out the right which he seeks to establish, or the defendant shows that the plaintiff ought not to have the relief sought for.

' As the court, upon the defendant’s offers of proof, ruled that no equitable defence" could be interposed, and in this was, as we have seen, in error, the defendant is entitled to a new trial. We express no opinion whether the defendant did or did^ not make out by his offers such an equitable defence; because, "if his offer was defective, under the distinct ruling of the court, no alteration in its terms or substance would have availed him. The judgment should be reversed and a new trial ordered.

Judgment accordingly.  