This is an action to recover the possession of land. The plaintiff rests the right of the school district (which he represents,) to the land in question, upon an alleged exchange made by the district with Jehiel Parsons, in 1834. The district was, at that time, in possession of a school house and lot, on the south side of the street, holding under one Parsons by some sort of contract. It became desirable to remove the school house from that site. Parsons owned the land on the opposite side of the street, and, at a special meeting of the inhabitants of the district, Parson's agreed, verbally, with the district, to exchange with them, and give them a site on the north side of the street for their site on the south side. In pursuance of this agreement he staked out a piece of land, including *174the pieoe in question, on the north side. The school house was, the same year, moved across the street to it, and the contract for the site on the south side, which the district held from Parsons, was given up to him, and he sold the site to an adjacent owner. No deed was given hy him to the'district for the site on the north side, though he agreed to give one. The land staked out measured nearly a quarter of an acre, The school house was built upon one corner of it, and the lot waá never fenced out by the district, Some twelve or fifteen years before the trial (being ten to thirteen years after the exchange,) the defendant, who occupied the Parsons farm, fenced in all of the site so staked out, except the part on which the school house stands and a small piece-in front and rear, and has since occupied it for farming purposes. It is this piece, so fenced by the defendant, that is thé subject of the controversy between the parties.
The plaintiff has, as it will be seen, at most a mere equjtuble title to the piece of land, the possession of which he now seeks to recover. Can he maintain this action on such title ? It is to be observed that this is what, before the Code, was called an action of ejectment. No equitable interest in the premises is set up in the complaint, and no equitable relief is demanded, the plaintiff alleging, therein, that the district .has lawful title as the owner in fee simple, so that the possession is not sought as incidental to a specific performance, or other equitable relief, but the plaintiff counts upon his title, and demands judgment for the possession of the premises.
Now although the Code has abolished the distinction between actions at law and suits in equity, so far as it regards the forms of procedure, still the principles by which the rights of parties are to be determined, remain unchanged. “The Code has given no new cause of action. If under the former system a given state of facts would have entitled a party to a decree in equity‘in his favor, the same state of facts now, in an action prosecuted in the manner prescribed *175by the Code, will entitle him to a judgment to the same effect. If the facts are such as that, at the common law, the party would have been entitled to judgment, he will, by proceeding as the Code requires, obtain the same judgment.” (Cole v. Reynolds, 18 N. Y. Rep. 76.) As this case stands, the defendant is a stranger to the transaction between the district and Parsons. He offered to prove himself a grantee of Parsons, but the evidence was objected to by the plaintiffs, and excluded. . There is no privity then, between the defendant and Parsons.
Even if Parsons himself were defendant, or any person in privity with him, the equitable rights of the parties could not be determined in this action upon the, issues here presented. Under proper pleadings, undoubtedly, the absolute rights of the parties in that case, whether legal or equitable, or both, could be determined in one action. But this action being against a stranger in possession, by the plaintiff, resting not on a legal but a mere equitable title, I am unable to see on what principle he is entitled to recover. The defendant is mot the party who is bound to convey to the plaintiff; so that the proper parties to litigate the question of the plaintiff’s equitable title are not before the court. As between other parties, the rule, I apprehend is, as it has always been in this action, that the plaintiff can recover only on his legal title. (Doe v. Staple, 2 T. R. 684. Doe v. Wroot, 5 East, 132. Jackson v. Pierce, 2 John. 221. Jackson v. Chase, Id. 84. Moore v. Spellman, 5 Denio, 225.)
Before the Code, what would have been the relative rights of these parties ? Clearly no action at law could have been maintained by the plaintiff against the defendant. Ueither can I see any ground on which a suit in equity could have been maintained. The rights of the parties to the alleged exchange must first have been settled by a court of equity, and a specific performance of that contract enforced against Parsons, or those holding the legal title from him, before the *176plaintiff could have maintained any action against the defendant. Even if this could have been' accomplished in a single suit, by making the defendant a party to the suit against Parsons, for the specific performance, still without a decree against Parsons, none could have been had against the defendant. To allow the plaintiff to recover, then, against the defendant, in this action, would be admitting a new cause of action which did not before exist, either at law or in equity.
In regard to what shall constitute a cause of action, the Code, as intimated in Cole v. Reynolds, (supra,) has made no change. The extent of the change brought in by it, so far as this question is concerned, is, I apprehend, that now, as stated in Crary v. Goodman, (2 Kern. 268,) “the question in an action is, not whether the plaintiff has a legal or an equitable right, 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.” As already stated, the law of the land has never allowed a plaintiff, either at law or in equity, to recover in a case like this. And if before the Code he could not have recovered, in any court, upon such a cause of action as he here seeks to establish, he can not, since the Code.
The defendant, after all the evidence was given, moved for a nonsuit on the grounds, among others, “that the plaintiff had not proved a cause of action, nor the cause of action alleged in the complaint. Also, that the plaintiff’s rights, if any, are equitable, and he must sue in equity, and not otherwise. These grounds, I think, sufficiently state the objection above intimated, to the plaintiff’s recovery. He had not proved a cause of action entitling him to a recovery against the defendant, and should have sought relief in an equitable action against all the parties obligated to grant him his equitable rights. I think, therefore, the nonsuit should have been granted.
*177[Broome Gbnbrai, Term, July 8, 1862.There are numerous other objections, made by the defendant’s counsel to a recovery; hut as this disposes of the case, it is unnecessary to consider them.
I am of the opinion that a new trial should he granted.
Ordered accordingly.
JBaleom, Caiwpbett, Parker and Mason, Justices.]