This is an appeal by the plaintiff—a street-railway corporation—from a judgment of the superior court denying its prayer for an injunction restraining the defendant from interfering with the exercise of an alleged franchise. The record consists of the pleadings, certain stipulated facts, and the decree, from which it appears that, by an ordinance of the city of Los Angeles, duly adopted May 11, 1897, the predecessors of plaintiff were granted a franchise to construct and operate a street-railway over and along certain streets of that city—the work of construction to be commenced within six months, and completed within eighteen months from the passage of the ordinance. By a subsequent ordinance the time of completion was extended six months, but at the end of this extended time—May 11,1899—only one and three-quarter miles out of four and three-quarter miles of the projected road had been built, leaving one mile at one end and two miles at the other end of the route covered by the franchise entirely vacant and unoccupied, in which condition it remained until May 1, 1903, a period of four years. One of the express conditions contained in the ordinance granting the franchise was the following: “If said road is not fully completed and in operation within said time, then this franchise shall be forfeited as to the portion thereof uncompleted.” The grantees of the franchise paid the city therefor the sum of five thousand dollars. No ordinance declaring the franchise forfeited was ever passed or adopted, but on May 15, 1903, while the plaintiff was engaged in the work of extending its tracks over a portion of the route described in the ordinance which had been left unoccupied from May 11, 1899 to May 1, 1903, the defendant, by its police officers and superintendent of streets, entered upon this new construction, compelled plaintiff to suspend work and threatened to tear up and remove the newly laid tracks.
To enjoin this proceeding the present action was commenced May 15, 1903. It appears from the decree that an injunction pendente lite was issued restraining defendant, its officers, agents, etc., from tearing up, removing, destroying, or in any wise interfering with the new portion of the track then in process of construction, and this temporary injunction remained in force until October 12, 1905, when it was dissolved by the final decree from which this appeal is prosecuted.
*244The question whether the superior court erred in dissolving the temporary injunction and denying a permanent injunction depends mainly upon the further question whether the franchise of plaintiff was forfeited ipso facto by its failure to complete the road within the time limited by the grant. The respondent claims that it was so forfeited under the provisions of section 502 of the Civil Code, while the appellant contends that without a decree declaring a forfeiture in an action by the attorney-general in behalf of the state, the franchise remained unimpaired. It is argued in support of this view that nothing is involved in this controversy beyond the respective rights of the plaintiff and defendant growing out of and dependent upon the ordinance granting the franchise, which, it is contended, embraces all the terms of the contract, and which upon the received construction of grants providing for forfeitures upon breach of conditions subsequent, means no more than that their breach entitles the grantor to maintain an action to enforce the forfeiture. The respondent, on the other hand, contends that section 502 of the Civil Code in force at the date of the grant is a part of the contract, and that it is self-executing in working a forfeiture for failure to complete the construction of the road within the time' specified in the ordinance.
We agree with the appellant that the rights of the parties are measured by the terms of their contract, but we think the statute (Civ. Code, sec. 502) enters into the contract, and that its provisions must be taken into account in construing the contract. The city in granting a street-railway franchise is but an agency of the state, and if there were any conflict between the ordinance containing the grant and the general laws of the state, the latter would govern. In this case, however, there is no conflict. The ordinance provides that in case of a failure to complete the work within the time limited the franchise shall be forfeited, but if this provision is not self-executing it is not in conflict with a provision of the statute which is self-executing, and so the only question is as to the proper construction of these words of section 502 of the Civil Code: “A failure to comply with either of the foregoing provisions of this section, or with either of the provisions of the ordinance granting said right of way, works a forfeiture of the right of way and also of the franchise,” etc.
*245We are of the opinion, that the words italicized make the statute self-executing. A judgment declaring and enforcing a forfeiture does nothing more than work a forfeiture, and when a breach of condition works a forfeiture there is no office for a judgment to perform, except perhaps to supply conclusive evidence of the fact—evidence which may in certain contingencies be useful, though not for all purposes essential.
Our conclusion upon this point is fully supported by the cases of Oakland R. Co. v. Oakland B. B. & F. V. Co., 45 Cal. 365, [13 Am. Rep. 181], and Upham v. Hosking, 62 Cal. 250. In neither case was the language providing for a forfeiture any stronger or more explicit than the language of section 502 of the Civil Code, but in both it was held that the forfeiture was complete upon failure to comply with the conditions of the respective grants. Those decisions have been frequently cited and never overruled by this court, though questioned in other jurisdictions.
Borland v. Lewis, 43 Cal. 569, is another case in which the provision for a forfeiture was held to be self-executing, but there the language of the statute was different and stronger than that in question here. A large number of decisions in other jurisdictions are cited by the appellant, many of which support its contention—and many of an opposite tendency are cited by respondent. We do not consider it necessary to review these cases, since our own decisions must control. The decision in People v. Los Angeles Electric Ry. Co., 91 Cal. 338, [27 Pac. 673], so far as it touches the question we are considering, implies that if the time allowed for construction had expired before the commencement of the action, the franchise would have been forfeited, but the question whether the provision of section 502, of the Code of Civil Procedure, for forfeiture of the franchise for failure to complete the work in time is self-executing would not have been involved.
In Santa Rosa etc. Co. v. Central Co., 112 Cal. 436, [44 Pac. 733], the question was involved and the final affirmance of the judgment of the superior court by reason of the equal division of the qualified justices of this court was in effect a decision that the forfeiture in such cases is self-executing.
It follows from this conclusion that the plaintiff having forfeited its right to use or occupy the street which it had left vacant for four years after the expiration of the time limited *246for the completion of its road, had no more right to lay its track there than one who had never been granted a right of way, and the city was clearly within its right in preventing the trespass.
Some cases are cited in support of the contention that even if the right of way was forfeited ipso facto on the 12th of May, 1889, the city could not lawfully oust plaintiff from the possession of the street by force. But those cases are not in point. The "plaintiff was not in possession. It was attempting unlawfully to take possession and the city was merely resisting an unlawful entry upon a street which its duly to the public required it to keep clear of unauthorized obstructions.
The judgment of the superior court is affirmed.
Shaw, J., McFarland, J., Sloss J., Angelotti, J., and Lorigan, J., concurred.