Ole O. SMnnes brought an action in Swift county against Jallmer F. Nyquist to cancel a contract whereby the plaintiff had agreed to *434 convеy a farm in Swift county to the defendant and the defendant, as the consideration therefor, had' agreed to convey certаin real estate in Kandiyohi county to the plaintiff. The plaintiff alleged as the ground for the action that the defendant had fraudulеntly misrepresented the character and condition of the Kandiyohi county property. He also alleged that he had еxecuted a deed for the Swift county land and asked that this deed be canceled. He did not allege that this deed had been delivered, nor that the defendant had executed any conveyance of the Kandiyohi county property, nor that any chаnge of possession had taken place.
The defendant is a resident of Kandiyohi county and duly made an affidavit and demand fоr a change of venue to that county. The clerk of the court of Swift county transferred the files to the clerk of the court оf Kandiyohi county. The plaintiff, claiming that the action was a local action triable only in Swift county, made a motion for an order sending the case back to that county. The court granted the motion and sent the case back. The defendant then prоcured an order from this court requiring the district court to show cause why a writ of mandamus should not issue requiring that court to transfer the cаse from Swift county to Kandiyohi county.
Section 9214, G. S. 1923, provides that all actions not enumerated in sections 9207 to 9213 shall be tried in the county in which the defendant resides. Section 9207 provides that actions for the recovery of real estate or for the determination of an estate or interest therein shall be tried in the county in which the real estate or some part thereof is situated. Whеther the facts set forth as a cause of action and the relief sought therein bring a particular case within one or the other of the sections cited, is so frequently a matter of doubt that it has given rise to many controversies.
Actions triable where the dеfendant resides are termed transitory; those triable where the subject matter is situated are termed local. It is settled by prior decisions that the requirement that actions shall be tried where the defendant resides is the general rule, and that the requirement that сertain actions shall be tried-W where the subject matter is situated is an exception to that rule, B
*435
and that to bring a case within the. еxception the subject matter must be wholly local. Smith v. Barr,
Actions on contracts including those relating to real estate hare always been recognized as transitory. Little v. C. St. P. M. & O. Ry. Co.
*436
An action to enjoin the foreclosure of two mortgages, one on real estate; the other on chattels, and to cancel the mortgages and the note secured thereby, and expunge the real estate mortgage from the records was held to be local in Kommer v. Harrington,
Thе prior decisions may not be entirely consistent in all respects, yet they establish these general rules: That where the subject mаtter of an action is land only and the primary and principal relief sought relates to the land, the action is local and must be tried where the land is situated; that where the subject matter is a contract and the primary and principal relief sought is to enforce it, or to determine the rights and obligations growing,out of it, or to have it annulled as invalid, the action is transitory and must be tried where thе defendant resides, although it may also involve the determination of rights in or title to real estate.
The present action is brought to cancel a contract, and a deed executed pursuant thereto on the ground that the plaintiff: was induced to enter into the contract by fraudulent misrepresentations. The subject matter of the action is the contract, and the primary and рrincipal relief sought is to have it canceled. Plaintiff must establish a right to have the contract canceled in order to оbtain any relief under this complaint. If he establishes that right, he may also have the right to have the deed canceled as an inсidental part of the relief to which he will then be entitled, but in that event | only.
*437 We think tbat under tbe rules stated this action clearly falls within the class of actions triable in the county in which the der fendant resides. Let a peremptory writ issue.
