This action was commenced in Tuolumne County, against the defendant, who was then a resident of the county of Merced. After the service of the summons upon the defendant, and at the time of his demurring to the complaint, he filed an affidavit of merits, and demanded, in writing, that the place of trial of the action be changed from Tuolumne County to Merced County, upon the ground that Merced was the proper county for the trial of the action, and supported his motion by an affidavit that at the time of the commencement of the action he was, and had been for many years prior thereto, a resident of the county of Merced. The motion was denied, and the defendant has appealed from the order denying the same.
It is alleged in the complaint that in July, 1876, one D. G-. Smith, under whom the plaintiffs claim, was the owner and in possession of certain real estate in Tuolumne County, and certain estate in Merced County, and certain personal property consisting of upwards of twenty-six thousand sheep, together with horses, wagons, harnesses, and camp equipage, and was at the same time indebted to the defendant in the sum of thirty-one thousand dollars, and to other persons in the further sum of thirty-three thousand dollars; and that “ for the purpose of securing the payment of said indebtedness,” it was agreed between said D. G. Smith and the defendant that said D. G. Smith “ should deed by conveyance absolute on its face, but which in fact should be a mortgage, all his right, title, and interest in and to all of said *574real and personal property, to the defendant, who was to carry on the business of said D. G. Smith, to wit, that of sheep-raising, and pay from the proceeds of said business all the indebtedness of said D. Gr. Smith, and when said indebtedness had been fully paid and discharged by the defendant, he was to reconvey all of said property, real and personal, and the increase thereof, to said D. G. Smith ”; that, “ in furtherance of and in accordance with said agreement, and with the purpose and intent of complying with its terms and securing the payment of said indebtedness, said D. G. Smith executed and delivered to the defendant conveyances absolute on their face, but which were in fact mortgages conveying all the aforesaid real and personal property to the defendant, and said property was then delivered to the defendant, and that the defendant has ever since been in possession thereof, and has had the use and received the proceeds and increase thereof, for the purpose of complying with the terms of said agreement.”
The complaint further alleges that “ the defendant has received from said property, and from the proceeds and increase thereof, large sums of money which greatly exceed all that was necessary to carry on said business and pay the expenses thereof, and also to pay all the indebtedness of said D. G. Smith”; that the defendant, ever since said conveyance to him, “ has had and now retains the sole and exclusive use, possession, and benefit of all of said property, and of all the proceeds and increase thereof.” Upon this complaint, the plaintiffs pray for a judgment against the defendant, that it be decreed that the absolute conveances aforesaid were and are mortgages, and that the indebtedness which they were given to secure has been fully paid, and the defendant convey said real and personal estate, together with the proceeds and increase thereof, to the plaintiffs, and that the defendant account to the plaintiffs for all of said real estate, and the rents, issues, and profits thereof, and all *575of said personal property, and the proceeds and increase thereof, and that plaintiffs have judgment against him for such sum as shall be found to be due upon such accounting after satisfying such mortgage indebtedness.”
It does not appear from the complaint whether the conveyance of the real estate was distinct from that of the personal property, or whether the conveyance of the real estate in Tuolumne County was by a separate instrument from that which conveyed the real estate in Merced County, the averment being that said D. G. Smith did execute to the defendant conveyances “ conveying all the said real and personal property." Whether w'e construe this averment as an allegation that each conveyance included both real and personal property, or that one conveyance embraced only real estate, while the personal property was conveyed by another, is immaterial for the purpose of determining this appeal.
Section 392 of the Code of Civil Procedure provides that “ actions for the following causes must be tried in the county in which the subject of the action, or some part thereof, is situated, subject to the power of the court to change the place of trial, as provided in this code: 1. For the recovery of real property, of an estate or interest therein, or for the determination in any form of such right or interest, and for injuries to real property.”
Section 395 of the Code of Civil Procedure provides that “in all other cases the action must be tried in the county in which the defendants, or some of them, reside at the commencement of the action.”
The general spirit and policy of the statute is to give to the defendant the right of having all personal actions against him tried in the county of his residence. Provision is made for the trial of actions affecting real estate in the county where the land is situated, and for the trial of certain other designated actions in the county where the cause of action arose; but the general *576rule for the place of trial is prescribed in section 395, by the declaration that “ in all other cases ” the action must be tried in the county in which the defendant resides at the commencement of the action. This section is general and comprehensive in its terms, and embraces all other cases than those which are specified in the three preceding sections. It is intended to protect the defendant in the expense and inconvenience of being compelled to go to a distant county to defend himself against an action that might be commenced against him there, and is in accordance with the principles that obtain wherever the common law prevails, that the plaintiff who would seek redress from a defendant must seek it in the county where he resides.
When, however, the subject-matter of the action is local, and the judgment which is sought is to operate directly upon that subject-matter, it is provided that the action shall be tried in the county where the subject-matter of the action is situated. This being an exception to the general rule, the conditions under which the exception is claimed must be clearly and distinctly shown. The plaintiff cannot, by uniting in his complaint matters which form the subject of a personal action with matters which form the subject of a local action, compel the defendant to have both those matters tried in a county other than that in which he resides. It is only when real estate alone is the subject-matter of the action that the provisions of section 392 can be invoked against a defendant who resides in a county different from that in which the land is situated. If, in his complaint, the plaintiff join with such a cause of action another which is not embraced in its provisions, or if he also seeks a remedy against the defendant upon matters which are not embraced within the provisions of this section, his action becomes one of those “other cases” provided for in section 395, which the defendant is entitled to have tried in the county of his residence.
*577It is evident, upon the examination of the complaint herein, that the primary object of the action is to obtain from the defendant an accounting of his transactions in carrying on the business of sheep-raising under the agreement of July, 1876, with a personal judgment against him for the excess that upon such accounting may be found to have been received by him above the amount required to discharge the indebtedness of his grantor, and that he reconvey the property to the plaintiffs. The basis of the plaintiffs’ cause of action against the defendant is contained in their allegation that “ he has received from said property, and from the proceeds and increase thereof, large sums of money, which said sums greatly exceed all that was necessary to carry on the said business and pay the expenses thereof, and also to pay all the indebtedness of said D. G. Smith, covenanted to be paid in said agreement.” The “proceeds and increase ” of the personal property are treated in the complaint as distinct from the “ rents, issues, and profits ” of the real estate. It is under this allegation that the plaintiffs demand an accounting from the defendant, and ask that they may “ have judgment against him for such sum as shall be found to be due upon such accounting.”
An action for an accounting is a proceeding in equity, and is essentially a personal action. The defendant has the right, under section 395 of the Code of Civil Procedure, to have such action tried in the county of his residence. The plaintiff cannot deprive him of this right by uniting in his complaint with such action a demand for an accounting for certain rents, issues, and profits alleged to have been received by the defendant fro in certain real estate situated in another county, and that he be adjudged to reconvey said real estate. Unless the cause of action set forth in the complaint falls wholly within the provisions of section 392, or of one of *578the two next succeeding sections, the provisions of section 395 prevail.
In Ashurst v. Gibson, 57 Ala. 584, this principle was discussed. The statutes of that state provided that the complainant might file his bill for the foreclosure of a mortgage of real property in the county in which the real estate or a material portion thereof was situated. In that case, a bill to foreclose a mortgage of real and personal property was filed in a county other than that in which the defendants resided. The court say: “The locality of the real estate and of residence alike confer jurisdiction, and the complainant may at his pleasure elect the one or the other jurisdiction. The right of election is limited to suits the subject-matter of which is real estate, and does not embrace other suits having, a different subject-matter.....Land must be the subject-matter, and the exclusive subject-matter, of suit, or the jurisdiction conferred by the act does not attach. Remedies must be pursued in the district of the residence of a material defendant, if land and personal property are the subject-matter of suit. Jurisdiction of the one cannot draw to the court jurisdiction of the other. A mortgage may embrace a very inconsiderable quantity of land of insignificant value, and personal property of very large value. It could not properly be said a suit for foreclosure or for redemption had for its subject-matter land. Its subject-matter is land and personal property, and in such a case, it would contravene the spirit and policy of our legislation to subject parties to suit in the county in which the land is situated without the county of their residence.” This case was cited with approval in the case of Le Breton v. Superior Court, 66 Cal. 27, where it was held that an action against a trustee, for an accounting of both real and personal property, was properly brought in the county where the defendant resided.
It was held, in Baker v. Fireman’s Fund Ins. Co., 73 *579Cal. 182, that an action for the purpose of procuring a reconveyance of land that had been conveyed by absolute deed, as security for a debt, upon the averment that the debt had been paid, should be tried in the county where the land was situated. In that case the only issue presented was as to the right of a reconveyance after the payment of the debt, the court saying: “ The land is the subject-matter concerning which the contest is waged, and it is situate in San Joaquin County.” We do not intend to question the correctness of that decision, but we are not inclined to extend its doctrine so as to include an action for an accounting, and a personal judgment thereon, brought against a defendant in a county other than that of his residence, simply because a portion of the property for which he has to account is land situate in that county.
The order of the superior court denying the motion is therefore reversed, and it is directed to make an order changing the place of trial from Tuolumne County to Merced County.
Paterson, J., Sharpstein, J., De Haven, J., McFarland, J., and Garoutte, J., concurred. _