The Town of Mason obtained from the judge of the circuit court of Mason County' a writ of mandamus nisi against the Ohio River Railroad Company, which was dismissed upon demurrer, and the town brings the case to this Court.
The writ of mandamus avers that the said railroad company obtained from said town an ordinance granting it the right to construct and operate its railroad along First street in that town, upon the condition that the railroad company should construct its road so as not to necessarily impair or destroy the use or enjoyment of said First street or other street of said town; that said railroad was constructed pursuant to the said grant upon said street; that in addition to laying its main line along said First street, it also constructed and laid a switch or side track along First street, crossing Center, Pomeroy, and Adams streets, and an alley, thus making a long distance of side track or switch along First street; that the width of the side track or main track from the two extreme outsides is twenty-six feet and six inches, including the ties, and the width from the side walk to the end of the railroad ties on First street is eleven feet and six inches, that being the space left for the *185public passageway on said street;, and that of this eleven feet two feet and six inches was appropriated and necessary for curbing and draining the street, thus leaving, in fact, but nine feet for public use for wagons and other vehicles; that the said street was ,so obstructed by the cars of the railroad company running over or standing on the said side track and main track, as to almost destroy the use of said street for the purposes of the public; that said street could be used fairly well by the public but for the presence of said side track and switches, that if the side track and switch were removed and the street put in order as it was before said side track was laid, then First street would be of particular use to tire public, but with the construction of said side track and switch in addition to the main line, First street cannot be restored to its former state or to such state as to not unnecessarily impair its usefulness; that if said side track or switch should be removed, then First street could be restored to its former state for public use.
The writ further avers that, so much of the said ordinance as allowed the railroad company to construct siding and switches upon First street is invalid and without law or force, and that the company had no authority to construct a side track or switch along First street, either under said ordinance or under any statute; that the council of the town had passed an ordinance requiring the railroad company to remove the side track which it had laid on First street, and in other respects to restore the street to its former usefulness and render it as a highway passible and convenient for public travel, as it was before the side track was constructed.
The writ further avers that it was the duty of the railroad company to1 construct proper crossings over the track where Center, Horton and Adams streets and said alley intersect First street, and that tire company did attempt to make such crossings but that they were rough, uneven, irregular, weak, and poorly constructed, so as to make it almost impossible to pass over First street and the' railroad where the crossings were laid; that the railroad company has failed and refused to take up the side track or switch, and failed and refused to make suitable crossings in First street over its track where it is intersected by said named streets and alley, and fails to restore said First street to its former state, or to such state as to not unnecessarily impair its usefulness as a highway.
*186The writ of mandamus further avers that ever since the building of said side track the defendant company constantly used it for the storage of freight cars, both loaded and empty, for a longer time than necessary to receive and discharge freight, and thereby so hindered and annoyed the 1 ravelling public as to render the use of First street practically of no value to the public; and that the defendant allowed its freight cars to remain on the side track at points of crossing of said street so as to make it impracticable to use First street and the crossings thereon by the public for travel; that the company had so constructed its main and side track along First street as to unnecessarily impair its use, in that both the mam and side tracks were so laid that the large steel rails upon the large cross ties extend and project several inches above the surface of the street, so as to materially obstruct travel.
The writ of mandamus nisi commanded the company to take up and remove said side track, and to put in proper condition and repair the said crossings, and to restore First street to its former state, or to such state as to. not unnecessarily impair its usefulness as a street, and to not permit its freight cars to remain on said side track, or switch or main line for a longer time than is necessary to discharge its freight, o.r to use said side track for the storage of freight or passenger cars, and to so construct its railroad, both main line and side track, as to restore First street to its former state, or to such state as not to unnecessarily impair its usefulness, or to show cause against so doing. This case presents a matter of vital importance to the public and railroad companies as it involves their conflicting interests in the use of streets in cities and towns. The streets laid out many years ago have been found to be of inadequate width, not answering the present needs. In our day the railroads are a prime necessity for transportation and inter-communication. They must pass by towns and cities where heavy population and business imperiously demand their presence. In most, or in many instances, they must pass through the streets. So must the public pass along the same streets. It follows of necessity that both, the péople and the railroad must use these streets in common. Each must give and take. It is very well settled that a railroad may be lawfully constructed upon, or across a street, with the consent of the town or city, upon the terms specified by statute, and the terms which the municipal author*187ity may see fit to inerorporate in tbe grant. When such a grant is made by a municipality, it is a binding contract between it and the railroad company, which may not be abrogated by the municipality. Elliott on Railroads, s. 1079; Asheville Railroad Co. v. City of Asheville, 109 N. C. 688; People v. O’Brien, 7 Amer. St. R. 684. But such a grant is subject to the terms and conditions specified in our Code, chapter 54, section 50, clause 6; namely: that the company “shall restore the street to its former state, or to such state as not unnecessarily to have impaired its ' usefulness and to keep such crossing in repair.” It is also subject to such conditions as the municipality may add; but those conditions, specified in the act cited, empowered the city or town to make such a grant, whether specified in it or not, as the legislature has chosen to say that such conditions shall be ever present in the very act conferring upon cities and towns the power to make such grant. And just here I will add an important further principle, that besides the terms and conditions nominated in the Code and the municipal grant, such grant is always taken subject to the exercise by the municipality of proper general police powers. This is so for the obvious'reason that a municipal corporation could not, if it would, make any grant of that kind which would disable itself from the exercise of just police powers, since they are governmental and therefore indispensable. Railroad Company v. Transportation Co., 25 W. Va. 234; Douglas v. Ky., 168 U. S. 488; Chicago etc. Co. v. Quincy, 29 Am. St. R. 334. We must conserve these powers always to be justly, reasonably and fairly exercised between the public and the corporations. No- man, no corporation, is above these essential powers. Counsel for the town of Mason contests the validity of that part of the franchise in this case which gave the railroad company power to lay down side tracks. The ordinance granted the company the right to lay down a double track, side track, and switches. I do not see that the position of counsel herein can be sustained. Tbe Code in the section cited gives the railroad company right “to construct its railroad across, along, or upon any street.” ' This language is broad and general. It does not mention main or side track. A side track is an essential part of the railroad. But while such is the construction of the statute, it does not by any means follow that the company may destroy the street by rendering it impassible, or by manopolizing its use. The law makes the street subject *188to a joint use. If a side track so takes up the street as to virtually destroy or impair its use by the public for passage., the railroad company cannot construct or maintain it. The municipality holds the street in trust for public use. It possesses power to discontinue a street; but as long as it is a street it must give the public adequate use of it. It has been practically decided that if it appears that a side track injures the public right it may be removed. City of Burlington v. Burlington St. Railway Co., 59 Iowa 144. But the strong argument is that the Code makes the public right paramount, over that of the railroad, as it makes the grant of the right of way through the street subject to the public use. The statute plainly intends to preserve this indispensable easement. If the railroad company can use a side track without serious injury to the public passage, it may do so; but if it cannot, if its use will destroy the public easement, the additional track cannot be maintained. To apply this principle, however, it must be very apparent that the two rights cannot coexist. Moreover, this principle would show that the company cannot occupy more of a street for its side track than is really essential for its business. It must leave enough room for the public passage. . The city council can restrict it to a space consistent with the public use. It may do this by passing and executing an order, or by writ of mandamus, or a mandatory injunction. It is quite well settled that when a railroad company accepts such a franchise with its conditions it can be compelled to perform them by mandamus, or mandatory injunction. Moundsville v. Ohio R. R. Co., 37 W. Va. 92; 3rd Elliott s. 1092; Wood on Railroads 806. The general police power of the municipality abqve spoken of justifies this, as well as the conditions annexed to the grant. It is obvious that the main purpose of this preceding is the removal of that .side track. It is only upon the ascertainment of the fact, as a fact, that its continuance will materially prejudice the public use that its removal or change of location can be compelled in the proceeding.
Does the railroad company occupy more than is absolutely essential for its business? If so, power is resident in the town to narrow it. I draw a distinction, in this respect, between the main track and the side track. Without asserting the power to remove a main track, the power to change the location, or compel the removal of a side track may be asserted.
*189As to tbe charge that the railroad company stores cars upon this side track at crossings, operating as an impediment to travel, the law is well settled. The company has the right to pass cars over crossings, but it cannot "store cars on them; it cannot make these crossings a place oí deposit for its cars, and thus obstruct priblic passage over them. This would be an improper use of its track, main or siding. It has only the right of passage over those crossings, occupying them only for such reasonable time as is necessary in passing its cars over them. Depositing cars upon them is a public nuisance, because it is an obstruction of a highway without justification of law. 2 Elliott on Railroads s. 718; State v. Monongahela R. R. Co., 37 W. Va. 108; State v. Ohio R. R. Co., 38 Id. 242; State v. Railroad, 95 N. C. 602. These authorities, all authorities, tell us that an improper use of these crossings constitute public nuisances, subject to indictment. 3 Elliott on R. R. s. 1096; 1 Am. St. Reports, p. 834; Am. & Eng. R. Cases 34. Likely mandamus would also lie to compel the company to desist from the practice of so using the crossings. As to that feature of the writ of mandamus seeking to compel the company to maintain proper crossings, it is necessary to say but little. The very letter of the statute and the condition annexed to the grant demand that the company maintain continuously such crossings. It is indictable for a public nuisance if it does not do so, and it can be compelled to do so by mandamus or mandatory injunction. Moundsville v. Ohio R. R. R. Co., 37 W. Va. 92; State v. Manongahela R. R. Co. Id. 108; State v. Ohio R. R. Co., 38 Id. 242; Elliott on Railroads s. 1092; 1 Wood on Railroads 806. We therefore conclude that the mandamus states a sustainable case on its face, and that the court erred in sustaining a demurrer to it. It is said that the reason of the court for dismissing the case was that the plaintiff amended its writ of mandamus, and did not serve it as amended upon the defendant. This reason is not relied on in this. Court, and properly so, because a writ of mandamus nisi performs the two-fold function, of process and declaration. Fisher v. City of Charleston, 17 W. Va. 628. As a declaration it may be amended, and if in its original form it was served on the defendant it is not necessary to re-serve it in amended form. It is amendable, like all other declarations. They are never re-served. An amended declaration in ejectment is not served, though like a mandamus *190nisi, a declaration in ejectment performs such two-fold function.
The writ of mandamus nisi also avers that the railroad company never did restore the street to its former condition) or to a condition such as not to unnecessarily hinder travel. If the railroad company has not once done so it can yet be compelled to do so, by mandamus or mandatory injunction, even if there were no statute so requiring, or if the grant by the town of the right of way did not so require, as they both clearly do, the common law would enjoin it. Elliott on Railroads, s. 1092; Opinion in Moundsville v. R. R. Co., 37 W. Va. 97; Elliott on Streets, s. 809; 1 Wood on Railroads 758. Therefore, we reverse the judgment, overrule the demurrer and remand the case to the circuit court for further proceedings.
Beversed.