The plaintiff brought this action to ■ obtain an injunction restraining the defendants from laying out, opening, or constructing a public road, or any road, over, across, or upon a certain described tract of land situate in Santa Cruz County, or from opening, breaking, or tearing down the inclosure about the said tract of land, or in any manner entering thereon for the purpose of making such road.
The court below granted the relief prayed for, and the defendants appeal from the judgment, and from an order denying them a new trial.
It is alleged in the complaint that on the eighteenth day of August, 1873, an action for the partition of the rancho San Andreas was pending in the district court in and for the county of Santa Cruz, wherein Edward Briody was plaintiff, and Titus Hale, Francis Larkin, and others were defendants; that on the day named a judgment was duly given, made, and entered in the action by ■which the tract of land described in the complaint in this action was allotted and set apart to the said Larkin in severalty; that under and by virtue of this judgment Larkin entered upon the premises so set apart to him, *3claiming and having the title thereto, and thereafter, continuously up to October 21, 1882, had and held the actual, open, notorious, exclusive, and adverse possession of the whole of said premises, and paid all taxes levied or assessed thereon; that on the day last named Larkin sold and conveyed the whole of said premises to this plaintiff, who thereupon, under and by virtue of his deed of conveyance, entered upon the same, and has ever since had, held, and claimed the actual, exclusive, open, notorious, and adverse possession thereof, and has paid all taxes levied or assessed thereon; and that there is not, and never was, any road or highway across the said premises, or any part thereof, but that the same at all times named have been inclosed by a substantial fence.
It is further alleged that in December, 1886, and again in January, 1887, the defendant Freshour, who was the road overseer of the district in which the plaintiff’s land was situate^ was insolvent, and was “instigated thereto and aided and abetted” by the other defendants, who were the supervisors of the county, broke and tore down plaintiff's inclosure and entered upon his land, dug up and removed the soil, trampled down and destroyed the grass and other crops growing thereon, and cut down and removed trees standing thereon, with the avowed intention and purpose of laying out, opening, and constructing a public road over and across said land; that the acts of defendants are trespasses, which, if continued, will do great and irreparable injury to the plaintiff, and that they will be repeated and continued unless restrained by the court.
The defendants demurred to the complaint, on the grounds,—1. That there was a misjoinder of parties defendant; and 2. That the facts stated were not sufficient to constitute a cause of action. The demurrer was overruled, and an answer filed.
The answer denies plaintiff’s ownership of the land, and most of the other allegations of the complaint. It *4then sets up that by the judgment in the partition suit of Briody v. Hale et al., entered on the 18th of August, 1873, it was, among other things, ordered, adjudged, and decreed that there be, and thereby was, laid out and established over and across the lands allotted to Larkin a public road, which was known and called the Larkin Valley road, and was particularly described, and that it was this road which defendants were trying and had a right to open.
At the trial the plaintiff offered and read in evidence the judgment roll in the case of Briody v. Hale et al., and thereupon the parties stipulated as follows: “ This action is hereby submitted to this court for its decision and judgment upon the following question of law, viz.: Does the said judgment in said action of Briody v. Hale et al. of itself establish or declare a public road or highway over or across the lands described in the complaint herein, called in said judgment the Larkin Valley road (it being conceded that the said Larkin Valley road named in said judgment passes over the lands described in said complaint herein, so far as said judgment can establish a road), so as to justify the defendants herein, acting in their official capacity as supervisors, or road overseer, or otherwise, in now entering upon said lands, and opening, laying out, working, or using a public road over or across the same along the route set out and described in said judgment, defendants not having entered upon any other portion of said lands? If the court shall decide that said defendants are not justified in so doing, then plaintiff is entitled to a judgment as prayed for in his complaint, but without damages; if defendants are so justified, then they are entitled to a judgment that plaintiff take nothing by said action, but that they recover their costs herein, and that said road be adjudged a public road in accordance with the prayer of defendants’ answer.” The case was then submitted for decision.
*51. We think the court acted rightly in overruling the demurrer. The complaint stated a cause of action, and, if its averments were true, the supervisors were joint trespassers with the road overseer, and were properly joined with him as defendants. (Code Civ. Proc., sec. 379; Grigsby v. Burtnett, 31 Cal. 406.)
2. The stipulation leaves for consideration only one other question, and that is: Did the partition judgment, rendered in 1873, “of itself,” and unaided by any other fact, authorize the defendants, in December, 1886, and January, 1887, nearly fourteen years afterward, to break the plaintiff’s close and enter upon his land to construct the road?
In the pleadings in the ease referred to there was no reference to roads, and no prayer that any portion of the property be set apart for road purposes. And at that time the statutes gave the district courts no power to set apart or establish roads by their judgments in actions for partition. On March 24, 1874, this power was conferred, for the first time, by an amendment to section 764 of the Code of Civil Procedure.
In support of the proposition that the judgment of the court setting apart and declaring the Larkin Valley road to be a public highway was binding and conclusive, and not subject to collateral attack, counsel for appellant cite Carey v. Rae, 58 Cal. 159. But that case does not sustain their contention. This is made evident by an examination of the record of the case, which shows that the judgment of partition, then under review, was entered in December, 1876, more than two years after the amendment above referred to was made. Counsel also cite section 2618 of the Political Code, which declares that “in all counties of this state public highways are roads .... laid out or erected as such by the public, . ... or made such in actions for the partition of real property.” This section, however, cannot aid the appellants, for the reason that the last clause of it, on which *6they rely, was first made a part of the section by an amendment adopted in 1883. The other cases cited hold only, in effect, that when a court has jurisdiction of the parties and of the subject-matter, its judgment, though erroneous, cannot be attacked collaterally.
This is undoubtebly true; but did the court in Briody y. Hale have jurisdiction of the subject-matter of laying out and establishing highways? The power to lay out roads was at that time given by the statutes exclusively to the boards of supervisors; and if the court had such jurisdiction, how did it obtain it? Suppose the court had undertaken by its judgment to set apart for the use of the public a portion of the land as a public park, would it have had jurisdiction of that subject-matter? and would its judgment in that respect have been final and conclusive as against any collateral attack?
It is unnecessary to answer these questions; for if it be conceded that the court had the jurisdiction which it attempted to exercise, still we think the judgment in this case must be upheld.
When the judgment was entered in 1873, and continuously thereafter until 1883, section 2620 of the Political Code, as applicable to Santa Cruz County, provided as follows: “A road not worked or used for the period of five years ceases to be a highway for any purpose whatever.” (Hittell’s Codes, p. 331; Stats, and Amendts. to Codes, 1883, p. 5.) Now, if the judgment bad the effect, “of itself,” to establish the Larkin Valley road, and to give the right to open and use it as a public highway, it had all the effect which, of itself, it could have at the time it was rendered. But as the road so established was not opened, worked, or used for nearly fourteen years afterward, and under section 2620, supra, had ceased to be a highway “ for any purpose whatever,” it is clear that the judgment, of itself, did not justify the defendants in entering upon the plaintiff's land and doing the acts complained of.
*7We therefore advise that the judgment and order be affirmed.
Gibson, C., and Vanclief, C., concurred.
The Court. — For the reasons given in the foregoing opinion, the judgment and order are affirmed.
Beatty, C. J., concurred in the judgment.