delivered the opinion of the court. The plaintiff is a municipal corporation and the defendant is a telephone company incorporated under article five, chapter twenty-one, of the Revised Statutes.
It appears that in 1879-80 the Hannibal Telephone Company and its grantors erected, under authority of a city ordinance authorizing the erection and maintenance of a telephonic exchange in said city, a number of telephone poles, including the poles in controversy, along Broadway, which poles have been used ever since by said company and its successors in connection with said telephonic exchange. The defendant is a successor of said Hannibal Telephone Company.
In May, 1886, some controversy arising between the city and defendant as to the defendant’s compliance with the original ordinance authorizing the erection of such poles, the following ordinance was passed by the city council, and approved by the mayor :
f£An ordinance requiring the removal from the sidewalks of the city of Hannibal, of the posts, piers, and abutments of the Missouri and Kansas Telephone Company.
“Be it ordained by the city council of the city of Hannibal:
£ £ Section 1. That the Missouri and Kansas Telephone Company, a corporation doing business in the city of Hannibal, in the state of Missouri, are hereby notified, ordered, and required to remove and take away from 'each and every public sidewalk, constituting a part of, or being in or on, any of the public streets, avenues, or alleys in said city, and within thirty days from the date of the publication of this ordinance, all posts, piers, and abutments now standing or being on the said sidewalks or any of them, and owned, controlled, operated, or maintained by said Missouri and Kansas Telephone Company.
“Sec. 2. In lieu of the present location of said posts, piers, and abutments, and in consideration of the *29alteration in the location of the same as provided for ib section one of this ordinance, license is hereby granted to said telephone company to re-locate, place, and erect upon any of the public streets, in said city, wherein any of said posts, piers, and abutments are now standing, being, or erected, such posts, piers, and abutments, as said company may see proper to erect; provided, how* ever, that such future erection and re-location of said posts, piers, and abutments by said company, in said streets, shall be outside of, and not immediately con* tiguous. to, the sidewalks of said city, and shall be only at the vertices of the angles of intersection of the streets in said city, as they lie outside of said sidewalks ; and, provided further, that the right to reerect or re-locate said posts, piers, and abutments shall be and is conditional upon said company first complying with the requirements of section one of this ordinance.
“ Sec. 3. In the event that said telephone company shall fail, neglect, or refuse to comply with the require* ments of section one of this ordinance, then, and in that event, the street commissioner of said city is hereby authorized, directed, instructed, and empowered to remove the posts, piers, and abutments mentioned in said section one, at the expense of the persons, companies, or corporations owning, operating, or maintaining the same, and to report the cost of such removal to the attorney of said city who shall proceed to collect the same from the parties liable therefor.
“ Sec. 4. Any person, company, or corporation that shall violate any of the provisions of this ordinance, or that shall fail, neglect, or refuse to comply with the same, shall forfeit and pay to said city a fine of one hundred and fifty dollars.”
The defendant upon demand neglected and refused to remove its poles, as required by the first section of the ordinance. The city thereupon filed a complaint against it before its recorder for the recovery of the fine mentioned in the fourth section, and upon a trial of such complaint before the common pleas court, on *30appeal, obtained judgment for the amount of the fine and costs. Prom that judgment the defendant prose,cutes the present appeal, and assigns the following errors : (1) That the complaint states no cause of action and the court erred in admitting evidence in its support; (2) that the evidence substantiates no cause of action, and the court should have rendered judgment for the defendant; (3) that the court gave an erroneous instruction or declaration of law.
In State ex rel. v. Flad, 23 Mo. App. 186, the respective rights of telephone companies, and the municipalities whose streets they occupy with their poles, were defined as follows: “By section 879, of the Revised Statutes, it is provided as follows : ‘ Companies organized under the provisions of this article for the purpose of constructing and maintaining telephone or magnetic telegraph lines, are authorized to set their poles, piers, abutments, wires, and other fixtures, along and across any óf the public roads, streets and waters of this state, in such manner as not to incommode the public in the use of such roads, streets, and waters. The .only limitation imposed by the legislature upon this privilege relating to the use of the streets and alleys of cities and towns for telephone posts is embodied in section 888 of the Revised Statutes, which is in the following language: ‘ The mayor and aldermen, or board of •common council of any city, and the trustees of any incorporated town,' through which the lines of any telephone or telegraph company are to pass, may, by ordinance, or otherwise, specify where the posts, piers, or abutments, shall be located, the kind of posts that shall be used, the height at which the wires shall be run; and such company shall be governed by the regulations thus prescribed; and after the erection of said telephone or telegraph lines, the said mayor and aldermen, or board .of common council, and the trustees of any incorporated town, shall have power to direct any alteration in the location or erection of said posts, piers, or abutments3 *31and also in the height at which the wires shall rnn, having first ’given such company or its agents opportunity to be heard in regard to such alterations.’ It will be seen that this limitation relates exclusively to three subjects: (1) The place where the posts, piers, or abutments shall be located ; (2) the kind of posts that shall be used; (3) the height at which the wires shall be run.”
The defendant does not question the right of the city in this instance to make a regulation in regard to, its poles “as to the place where the posts, piers, or abutments shall be located,” but contends, that when, posts are once located an alteration in their location cannot be arbitrarily made without some cause showing a necessity for the alteration. As the complaint fails to state any necessity for the change or any valid reason for the passage of the ordinance providing for the re-location, the defendant objects to it as stating no cause of action.
' The recorder’s court of Hannibal, where the complaint was originally filed, is not a court of record. Yery informal complaints are hold sufficient when filed before a justice, and we are not prepared to say that the complaint is fatally defective for the reason assigned. There was, however, no proof that the existing location of defendant’s poles incommodes the public, or that any good cause existed for the contemplated removal; and in the absence of such proof the' ordinance cannot be upheld. Besides that, the proof shows and the court. so found that the contemplated re-location is impracticable, as it-would place part of defendant’s poles at too great a distance from each other for practical operation of its lines. So finding, the trial court properly declared that part of the ordinance providing for a re-location illegal and void. As the two parts of the ordinance are necessarily dependent on each other, the case is not one where an ordinance void in part can be upheld as to other parts, and that of itself is fatal to plaintiff’s recovery.
Municipal corporations are prima facie the sole judges of the necessity of their ordinances, and courts *32will not, ordinarily, 'review their reasonableness, when they are passed in strict pursuance of an express grant. City of St. Louis v. Green, 7 Mo. App. 468; s. c., 70 Mo. 562. Where an ordinance, however, is altogether unreasonable and oppressive, it may be vacated by the courts for that reason alone. Corrigan v. Gage, 68 Mo. 545; Springfield Railway Co. v. City of Springfield, 85 Mo. 674; Kelly v. Meeks, 87 Mo. 401.
It is shown in this case that other corporations use the same streets for similar purposes, and that there is no substantial difference between the location of their poles and those of defendant. It is further shown that the only practicable way of effecting a change of poles so as not to cause an interruption of business, is a gradual and fractional change, the erection of new poles necessarily preceding the removal of the old. That an ordinance which discriminates against the defendant, which demands a re-location of its poles without apparent good reason, which demands a total removal of all standing poles, as a condition precedent to the right of re-location, and which fails to provide for any practicable re-location, presents such features of oppression and unreasonableness as to call for the exercise of the powers of the court last above referred to, admits of no-dispute.
We do not hesitate to declare the ordinance under which the defendant is prosecuted to be illegal and void' for these reasons alone. There is, however, a further feature of this ordinance so extraordinary in its character that we cannot pass it in silence. It will be seen that it first demands that the defendant should do a certain thing; and then provides that any person, company, or corporation, who shall fail to do the thing, which, in the nature of things, the defendant alone can omit to-do, shall be guilty of a misdemeanor. This is class legislation of the most obnoxious character. Municipal corporations exercise only powers delegated to them by the legislature, and where the legislature has no power *33to do a.thing it cannot delegate it to others. The constitutional inhibition imposed on the legislature against class legislation is necessarily imposed on every municipality. Even in the absence of a special constitutional inhibition, such legislation could not be upheld. Thus Judge Cooley says that it can scarcely be doubted but that a regulation made for any one class of citizens, entirely arbitrary in its character and restricting their rights, privileges, or legal capacities, in any manner before unknown to the law, ‘ ‘ would transcend the due bounds of legislative power even though no express constitutional provision could be pointed out with which it would come in conflict.” Cooley’s Const. Lim. 393. See for an elaborate discussion of this subject, Bank v. Cooper, 2 Yerg. 599, and Jones v. Perry, 10 Yerg, 59.
It necessarily results from the foregoing observations that the judgment of the court upon the uncontroverted facts was .an erroneous conclusion of law, and must be reversed. As no prosecution can be had under an ordinance which we are bound to declare illegal and void, no useful purpose can be subserved by remanding the cause. Judgment reversed.
All concur.