Opinion by
Mr. Chief Justice Bean.On June 12, 1894, the petitioner was arrested on a warrant of the Municipal Court of the City of Oakland, • issued upon a complaint charging him with having “committed a public nuisance within the platted portion of said city, by driving stakes as a part of the fence which he was then and there building along the side of the O. & C. Railroad, otherwise known as the Southern Pacific Railroad, contrary to ordinance No. 58 of the city,” and on a plea of guilty was fined $25. He thereupon sued out a writ of review to have the judgment of the recorder’s *483court annulled and set aside, on the ground that the ordinance was void. The writ being dismissed by the Circuit Court, he brings this appeal. The ordinance in question was passed by the Oakland council June n, 1894, for the declared purpose, as shown by the minutes of the meeting, of “prohibiting the Southern Pacific Railroad Company from building a fence along their railroad within the corporate limits of the city,” and provides: “That it shall be unlawful for any person, association, or corporation, owning, operating, or controlling any railroad within the corporate limits of the City of Oakland, Oregon, or any person or persons in the employment of any such person, association, or corporation, or any other person whatever, to build, construct, or maintain any fence or other obstruction whatever along the side of any such railroad within the portion of the corporate limits of said City of Oakland that is laid out in lots and blocks, and every such fence and obstruction is hereby declared a nuisance within and against the ordinance of said City of Oakland.”
1. In our opinion this ordinance cannot be sustained as a legitimate exercise of municipal power. The charter of the city confers upon it the power to prevent and restrain nuisances, and to “declare what shall constitute a nuisance”; but this does not authorize it to declare a particular use of property a nuisance, unless such use comes within the common law or statutory idea of a nuisance: 2 Wood on Nuisances (3d Ed.), 977; Yates v. Milwaukee, 77 U. S. (10 Wall.) 497; Village of Des Plaines v. Poyer, 123 Ill. 348 (5 Am. St. Rep. 524, 14 N. E. 677); Quintini v. City Board of Aldermen, 64 Miss. 483 (60 Am. Rep. 62, 1 So. 625); Chicago & Rock Island R. R. Co. v. City of Joliet, 79 Ill. 44; Hutton v. City of Camden, 39 N. J. Law, 122 (23 Am. Rep. 203). By this provision of the charter the city is clothed with authority *484to declare by general ordinance under what circumstances and conditions certain specified acts or things injurious to the health or dangerous to the public are to constitute and be deemed nuisances, leaving the question of fact open for judicial determination as to whether the particular act or thing complained of comes within the prohibited class; but it cannot by ordinance arbitrarily declare any particular thing a nuisance which has not heretofore been so declared by law, or judicially determined to be such: City of Denver v. Mullen, 7 Colo. 345 (4 Am. & Eng. Corp. Cas. 304, 3 Pac. 693). An ordinance of the city cannot transform into a nuisance an act or thing not treated as such by statutory or common law, nor can it prohibit the free use of property by the owner, so long as such use does not interfere with the rights of others. Every proprietor has a constitutional right to erect upon his property such buildings or other structures as he may deem necessary for its enjoyment, having due regard for the rights of others, and this is a vested right guaranteed by the constitution, and cannot be arbitrarily interfered with. It is true one cannot lawfully use his property in such a manner as to injure another, but a particular use which may or may not result in creating a nuisance according to circumstances cannot be declared such in advance. The question when it may or may not become a nuisance within some provision of law must be settled as one of fact and not of law. Now, the fencing of a railway track in the platted portion of a city can ordinarily work no more harm or injury to others than the fencing of private property, and it would not for a moment be contended that an ordinance prohibiting a private citizen from fencing his property regardless of the character of the fence would be valid. The fencing or enclosing of property is a lawful and harmless use, in itself, and does not become a nuisance because the municipal authorities *485have so declared, unless it is so in fact by reason of the character of the structure or the place of its erection; and in such case the ordinance should be directed against the unlawful and not the lawful act, leaving it to be judicially determined whether the particular structure is in fact a nuisance, either by reason of its character or the place of its erection. But the ordinance in question is not directed to the prohibition of such fences or structures, as may by reason of their character or location be a nuisance, but it absolutely prohibits a railroad company from in any manner fencing or enclosing its track in the platted portions of the city, although the fence may be upon its own property, acquired by purchase or condemnation, and although it may be necessary to do so as a protection to its servants or the traveling public, and, in our opinion, is manifestly void: Tiedeman on Limitations of Police Power, § 122a.
2. It is contended, however, that by his plea of guilty the petitioner has waived the right to insist in this proceeding that the ordinance is void; but the plea of guilty is only an admission that the defendant committed the acts charged in the complaint, and, unless such acts constitute an offense or are in violation of some valid ordinance of the city, his admission was not material, and he waived nothing thereby: Fletcher v. State, 12 Ark. 169. It follows that the judgment of the court below must be reversed.
Reversed.