Mr. Justice Van Devanter
delivered the opinion of the court.
This is a suit to enjoin the enforcement ,of an ordinance directing the removal of a railroad track from the intersection of two streets in Denver. On the hearing the plaintiff prevailed, but' this was reversed by the Supreme Court of the State with a direction to dismiss the complaint, 167 Pác. Rep. 969, and the direction was followed. The case is here on two writs of error when one would suffice.
The ordinance is assailed as contravening the contract and commerce clauses of the Constitution and the due process clause of the Fourteenth Amendment.
In 1881 a union depot with appurtenant tracks was established in Denver, the streets and alleys within the grounds thus occupied being vacated by the city; and since then all railroads entering the city have used this depot and its tracks. Wynkoop Street is outside the depot grounds and extends east and west along their south line. The depot faces that street and is but a short distance from it. On the other side of the depot are the depot tracks. These connect on the west with several railroad yards including that of the Rio Grande Company, and on the east with other railroad yards, including that of the Union Pacific Company. Wynkoop Street is intersected just opposite the entrance to the depot by Seventeenth Street, which extends northward through the city and is one of its main thoroughfares. Persons and vehicles approaching or leaving the depot pass over this intersection, the number doing so each day being approximately two thousand.
The plaintiff, the Rio Grande Company, has a track in Wynkoop Street from Nineteenth Street to Fourteenth Street. At its eastern terminus — near Nineteenth Street— this track meets a track of the Union Pacific Company which is connected with the yard of that company, and at Fourteenth Street it curves and leads to the Rio Grande Company's yard. Originally it was part of the Rio Grande Company's main line, but since 1881, when the union depot was established, it has been used only as a, side track in serving industries on the south side of Wynkoop Street.
The ordinance assailed directs the removal of so much of this track as lies within the intersection of Wynkoop and Seventeeth Streets, that is to say, the portion over which persons and vehicles pass in moving to and from the union depot; and a preamble recites that the use of that portion of the track impedes public travel, affects the safety of persons approaching or leaving the union depot and is no longer essential to the Rio Grande Company.
The Union Pacific Company" has a track in the same intersection which the ordinance deals with in the same way, but that company apparently is not complaining.
If the ordinance is enforced the Rio Grande Company can reach the industries on its track in Wynkoop Street between Seventeenth and Nineteenth Streets only through the tracks of the union depot and the Union Pacific. Because of this it will be subjected to some expense and delay not heretofore attending that service, and it also will be prevented from switching cars to and from those industries for other railroads and thereby will lose some revenue. But, according to the record, the loss in expense and otherwise incident to these disadvantages will be relatively small.
The track in Wynkoop Street has been there since 1871, and we shall assume, as did the Supreme Court of the State, that it was put therein virtue of some ordinance of that period, and that the ordinance became a contract and the right granted became a vested property right. But, as this court often has held, such contracts and rights are held subject to the faip exercise by the Staté, or the municipality as its agent, of the power to adopt and enforce such regulations as are reasonably necessary to secure the public safety; for this power "is inalienable even by express grant" and its legitimate exertion contravenes neither the contract clause of the Constitution nor' the due process clause of the Fourteenth Amendment. Atlantic Coast Line R. R. Co. v. Goldsboro, 232 U. S. 548, 558; Chicago & Alton R. R. Co. v. Tranbarger, 238 U. S. 67, 76. Of course, all regulations of this class are subject to judicial scrutiny and where they are found to be plainly unreasonable and arbitrary must be pronounced invalid as transcending that power and falling within the condemnation of one or both, as the case may be, of those constitutional restrictions.
The scope of the power and instances of its application are shown in the decisions sustaining regulations (a) requiring, railroad companies at their own expense to abrogate grade crossings by elevating or depressing their tracks and putting in bridges or viaducts at public crossings, Northern Pacific Ry. Co. v. Duluth, 208 U. S. 583; Chicago, Milwaukee & St. Paul Ry. Co. v. Minneapolis, 232 U. S. 430; Missouri Pacific Ry. Co. v. Omaha, 235 U. S. 121; (b) requiring a railroad company at its own cost to change the location of a track and also to elevate it as a means of making travel on a highway safe, New York & New England R. R. Co. v. Bristol, 151 U. S. 556; (c) prohibiting a railroad company from laying more than a single track in a narrow busy street although its franchise authorized it to lay a double track there, Baltimore v. Baltimore Trust Co., 166 U. S. 673; and (d) requiring a gas company whose mains and pipes were laid beneath the surface of a street under an existing franchise to shift them to another location at its own cost to make room for a public drainage system, New Orleans Gas Light Co. v. Drainage Commission, 197 U. S. 453.
Is the ordinance here in question plainly unreasonable and arbitrary? That there is occasion,for some real regulation is clear. The crossing is practically in the gateway to the city.. Persons in large numbers pass over it every •day — many of them unacquainted with the surroundings. Moving engines and cars to and fro over such a place makes it one of danger.. Any one of several forms of corrective regulation might be applied. To illustrate: The city might call on the railroad company to construct and maintain a viaduct over the crossing or a tunnel under it; or might lay on.the company the duty of maintaining watchmen or flagmen at the crossing. What it actually does by the ordinance is to call on the company to remove the track from the crossing and avail itself of other accessible and fairly convenient means of getting cars to and from its track east of the crossing. No doubt in this the company will experience some disadvantages, but they will be far less burdensome than would be the construction and maintenance of a viaduct or tunnel, and not much more so than would be the keeping of watchmen or flagmen at the crossing.
The situation is unusual and the ordinance deals with it in a rather practical way.. Giving effect to all that appears, we are unable to say that what is required is plainly unreasonable and arbitrary.
Counsel for the company manifest some concern lest the rates for switching cars to and from its track east of the crossing may not be satisfactory, but there hardly can be any real trouble along that line. The rates will be subject to investigation and supervision by public commissions just as are other railroad rates, and possible differences over them will be susceptible of ready adjustment.
The objection that the ordinance offends against the commerce clause of the Constitution is not tenable. The ordinance makes no discrimination against interstate commerce, will not impede its movement in regular course, and will affect it only incidentally and indirectly. South Covington Ry. Co. v. Covington, 235 U. S. 537, 540; Sligh v. Kirkwood, 237 U. S. 52, 58, 60. The case of Kansas City Southern Ry. Co. v. Kaw Valley Drainage District, 233 U. S. 75, obviously is not to the contrary.
Judgment affirmed.