The facts presented are substantially as follows:
The defendant company is a corporation of the state of Illinois, has complied with the laws of the state of Nebraska, so as to be authorized to do business as a railroad company in that state, and maintains a general office therein, and is the grantee of and successor to the Burlington & Missouri River Railroad Company in Nebraska, a corporation of the state of Nebraska, which company was the lessee of the Omaha & Southwestern Railroad Company, a corporation organized in the year 1869, under chapter 25, Rev. St. Neb. [170 U.S. 57, 60] 1866. That chapter contains, among other provisions, the following:
On May 14, 1884, an ordinance of the city of Omaha was approved, granting to the Omaha & Southwestern Railroad Company the right of way through portions of certain streets and alleys, including Eleventh street, in that city. The ordinance was in part as follows:
On March 4, 1885, an act of the legislature of Nebraska was approved, entitled 'An act to provide for viaducts, bridges and tunnels in certain cases, in cities of the first class,' whereby it was provided that the mayor and city council of any city of the first class should have power, whenever they deemed any such improvement necessary for the safety and convenience of the public, to engage and aid in the construction of any viaduct or bridge over or tunnel under any railroad track or tracks, switch or switches, in such cities, when such track or switches crossed or occupied any street, alley, or highway thereof, in the manner and extent provided for in the act, and should have the power to pass any and all ordinances, not in conflict with the act, that might be necessary or proper for the construction, maintenance, and protection of the said works.
By virtue of this act, the city of Omaha, which was then a city of the first class, and the Union Pacific Railway Company and the Omaha & Southwestern Railroad Company, the lessor of the defendant company, executed an agreement in writing February 1, 1886, providing, among other things, for the construction of a viaduct on Eleventh street across the tracks of those companies. The agreement was in part as follows:
Under the provisions of this agreement, the viaduct was built, and in 1887 it was opened to the use of the public. On March 30th of that year, a short time before the viaduct was completed, an act of the legislature was approved, entitled 'An act to incorporate metropolitan cities, defining, regulating and prescribing their duties, powers and government.' The act, which took effect from its passage, declared that all cities in the state of Nebraska then having a population of 60,000 inhabitants or more, according to the state census of 1885, and all cities in the state which should thereafter have a population of 60,000 inhabitants or more, should be considered and known as cities of the metropolitan class, and should be governed by the provisions of the act. Laws [170 U.S. 57, 63] Neb. 1887, c. 10. At that time the city of Omaha, according to the state census of 1885, had a population in excess of the said number, and under the act was incorporated a city of the metropolitan class. Section 48 of this act, as amended by an act approved in 1893 (chapter 3, Laws Neb. 1893 ), is as follows:
In May, 1890, the Union Pacific Railway Company, which now owns 21 tracks crossing Eleventh street beneath the said viaduct, entered into agreements with the Chicago, Rock Island & Pacific Railway Company and the Chicago, Milwaukee & St. Paul Railway Company, by the terms of which agreements it granted to those companies the right to possess and use, in common with itself, its main and passing tracks between certain points, which tracks are among the said 21 tracks, for the period of 999 years. Subsequently, in that year, the said companies entered into possession [170 U.S. 57, 65] of the interest granted them, and have since continued to use the said tracks in common with their grantor.
By a concurrent resolution of the city council of Omaha, adopted July 21, 1892, it was provided that the city engineer and the committee on viaducts and railways should examine the roadbed of the said viaduct, and report whether or not it was necessary to repave it. Acting under this resolution, the committee made an examination, and on the 23d of the following month reported in writing that both the roadway and sidewalk of the viaduct were in a dangerous condition. By authority of the city, the viaduct was closed to general public travel some time in 1892, but continued to be used by a street-railway company, whose tracks were laid across it, until the autumn of 1894, since which time the city has not permitted it to be used for any travel.
By an ordinance approved December 12, 1893, the city declared the necessity of repairing the viaduct, and empowered and directed the board of public works to prepare plans and specifications for the repairs. Such plans and specifications were thereafter prepared, and were submitted to the council December 15, 1893, by the board of public works and the city engineer; and on January 30, 1894, the council passed an ordinance, No. 3752, approved February 3, 1894, which is as follows:
Certified copies of this ordinance and of the said plans and specifications were furnished to the defendant company, but it refused to make the said repairs, or to take any action with reference to making the same; wherefore the present proceeding was instituted, as aforesaid. [170 U.S. 57, 67] Chas. J. Greene, for plaintiff in error.
W. J. Connell, for defendant in error.
Mr. Justice SHIRAS, after stating the facts in the foregoing language, delivered the opinion of the court.
The motion to dismiss the writ of error, on the ground that the rights and immunities of the plaintiff in error under the constitution of the United States were not set up or claimed in the state courts at the proper time and in the proper way, cannot be allowed.
This subject has been so frequently and so recently discussed by this court that it is unnecessary for us to further consider it at large. It is sufficient to say that this record discloses that the plaintiff in error, in its amswer to the writ of mandamus issued out of the district court of Douglas county, state of Nebraska, claimed that by reason of certain provisions of its charter, of general laws of the state, and of ordinances of the city of Omaha, all of which were specifically set forth, a contract was created between the plaintiff in error and said city in respect to the viaduct in question, the obligations whereof would be violated by the proposed enforcement of the subsequent act of 1887, contrary to the provisions of the constitution of the United States; that the district court held that the laws and ordinances so pleaded did not create a contract between the state and city on the one side and the plaintiff in error on the other; that the plaintiff in error, in its petition in error to the supreme court of the state, specifically assigned as error the holding of the trial court that the said laws, charter, and ordinances did not constitute a contract, within the meaning and protection of the constitution of the United States, guarantying the inviolability of contracts; and that the supreme court of the state, in its opinion disposing of the case, states that 'the most important subject of inquiry is presented by respondent's contontion that the ordinance under which the city proceeded in ordering the repairs [170 U.S. 57, 68] in question contemplates the taking of its property without due process of law, within the meaning of the state and federal constitutions, and also impairs the obligation of the contract under which its track was laid and under which said viaduct was constructed.'
We think it is plain from this recital that a federal question was specifically presented in both the trial and supreme courts of the state.
As the record further discloses that the state supreme court overruled the railroad company's contention that it held an existing contract whose obligation would be violated by the enforcement of the provisions of a subsequent law of the state, it becomes the duty of this court to inquire whether there was error in that judgment of the supreme court of the state.
We have often had occasion to say that this court, when reviewing the final judgment of a state court upholding a state enactment alleged to be in violation of the contract clause of the constitution, possesses paramount authority to determine for itself the existence or the nonexistence of the contract set up, and whether its obligation has been impaired by the state enactment. Bank v. Skelly, 1 Black, 436; Railroad Co. v. Rock, 4 Wall. 177; New Orleans Waterworks Co. v. Louisiana Sugar- Refining Co., 125 U.S. 18 , 8 Sup. Ct. 741; Mobile & O. R. Co. v. Tennessee, 153 U.S. 492 , 14 Sup. Ct. 968.
We shall proceed, therefore, to examine whether the statutes and ordinances to which the plaintiff in error points us constituted a contract, within the protection of the constitution of the United States, and whether such contract, if found to exist, has been impaired by the subsequent statute and the proceedings thereunder.
The contract, which the plaintiff in error sets up as constitutionally protected from subsequent legislation, is alleged to be found in the act of March 4, 1885, and the agreement in compliance with the provisions of that act between the city of Omaha, the Union Pacific Railway Company, and the Omaha & Southwestern Railroad Company on the 1st day of February, 1886. [170 U.S. 57, 69] By the provisions of the act, the mayor and city council in any city of the first class were authorized, whenever they deemed it necessary for the safety and convenience of the public, to engage and aid in the construction of any viaduct or bridge over or tunnel under any railroad track or tracks, switch, or switches in such cities, when such track or switches eross or occupy any street, alley, or highway thereof; to adopt and secure plans and specifications therefor, together with the estimated cost of the work; and thereupon, if the railroad company or companies across whose tracks or switches the work is proposed to be built will assume three-fifths of all damages to abutting property on account of the construction of said viaduct, bridge, or tunnel, and secure to the city the payment of the necessary funds to meet it as the work progresses, in such manner and with such security as the mayor and city council shall require, and when the payment of the further sum of one-fifth of the money required for said improvement is arranged for in manner satisfactory to said mayor and council, either by private donations or by execution of such good and sufficient bonds as will protect said city from the payment of said one-fifth, then the said mayor and council may proceed to contract with the necessary party or parties for the construction of such viaduct, bridge, or tunnel, under the supervision of the board of public works of such city, and to provide for the payment of one-fifth of the cost thereof by the city, by special tax on all taxable property in such city,a nd one- fifth by special tax on property benefited. It was further provided that the city, with the assent of the railroad company or companies aiding in the construction of any such viaduct, bridge, or tunnel, may permit any street-railway company to build its street-railway track and operate its railway upon or through the same, upon such terms and conditions and for such compensation as shall be agreed upon between the city and the street- railway company, and that the compensation for such use shall be set spart and used towards the maintenance of such viaduct, buidge, or tunnel; and it was further provided that the mayor and council of any such city should have the power to pass any and all ordi- [170 U.S. 57, 70] nances, not in conflict with the act, that might be necessary or proper for the construction, maintenance, and protection of the works provided for.
The agreement made, in pursuance of the said act between the city of Omaha, as party of the first part, and the Union Pacific Railway Company and the Omaha & Southwestern Railroad Company, as parties of the second part, provided that the parties of the second part assumed and agreed to pay, as should be required by the mayor and city council, three-fifths of the entire cost of constructing a viaduct along Eleventh street in said city over the railroad tracks of the said second parties, and three-fifths of the damages to abutting property on account of the construction of such viaduct, not otherwise provided for by waivers or private contributions, such entire cost and damages not to exceed the sum of $90,000; and that the amount so assumed and agreed to be paid, being three-fifths of the entire cost and damages, was to be apportioned between the railroad companies, so that three-fourths thereof should be paid by the Union Pacific Railway Company and one-fourth by the Omaha & Southwestern Railroad Company.
Under this agreement, the viaduct was built and formally opened to the use of the public early in the year 1887
By an act approved March 30, 1887 (Laws Neb. 1887, p. 105), entitled 'An act incorporating metropolitan cities, and defining, regulating and prescribing their duties, powers and government,' it was, among other things, provided as follows: 'The mayor and council shall have power to require any railroad company or companies, owning or operating any railroad track or tracks upon or across any public street or streets of the city, to erect, construct, reconstruct, complete and keep in repair any viaduct or viaducts upon or along such street or streets and over or under such track or tracks, including the approaches to such viaduct or viaducts as may be deemed and declared by the mayor and council necessary for the safety and protection of the public. ... When two or more railroad companies own or operate separate lines of track to be crossed by any such viaduct, the [170 U.S. 57, 71] proportion thereof, and of the approaches thereto, to be constructed by each, or the cost to by borne by each, shall be determined by the mayor and council. After the completion of any such viaduct, any revenue derived therefrom by the crossing thereon of street railway lines or otherwise shall constitute a special fund, and shall be applied in making repairs to such viaduct. All ordinary repairs to any such viaduct or to the approaches thereto shall be paid out of such fund, or shall be borne by the city.'
In 1893 another act was passed (Laws Neb. 1893, p. 70), amending the act of 1887, and making it the duty of any railroad company or companies to erect, construct, or repair any viaduct in the manner required by the mayor and council, providing a penalty for neglect or refusal to perform such duty, and prescribing a proceeding by mandamus to compel the companies to erect or repair any viaduct as may be required by ordinance, and empowering the city, in case of failure or refusal by the railroad companies, itself to do the necessary work, the cost thereof to be a charge and lien upon the property of the railroad companies, and also to be a legal indet edness of the companies, collectible by suit in the proper court. On January 30, 1894, the city council passed an ordinance requiring the Union Pacific Railway Company to repair that portion of the said Eleventh street viaduct for a distance of two-thirds of the entire length of the viaduct, and the Chicago, Burlington & Quincy Railroad Company, as grantee and successor of the Omaha & Southwestern Railroad Company, to repair the other one-third portion of said viaduct, said repairs to be made in accordance with plans furnished by the city, and under the supervision of the city engineer, and to be completed within 90 days. And upon the refusal of the companies to comply with said ordinance, separate proceedings in mandamus were brought against them.
No doubt, the agreement of 1886 constituted a contract, in such a sense that the respective parties thereto continued to be bound by its provisions so long as the legislation in virtue of which it was entered into remained unchanged. While the agreement lasted, its provisions defined the rights and duties [170 U.S. 57, 72] of the city and the railroad companies. But was it a contract whose continuance and operation could not be affected or controlled by subsequent legislation?
Usually, where a contract, not contrary to public policy, has been entered into between parties competent to contract, it is not within the power of either party to withdraw from its terms, without the consent of the other; and the obligation of such a contract is constitutionally protected from hostile legislation Where, however, the respective parties are not private persons, dealing with matters and things in which the public has no concern, but are persons or corporations whose rights and powers were created for public purposes, by legislative acts, and where the subject-matter of the contract is one which affects the safety and welfare of the public, other principles apply. Contracts of the latter description are held to be within the supervising power and control of the legislature when exercised to protect the public safety, health, and morals, and that clause of the federal constitution which protects contracts from legislative action cannot in every case be successfully invoked. The presumption is that, when such contracts are entered into, it is with the knowledge that parties cannot, by making agreements on subjects involving the rights of the public, withdraw such subjects from the police power of the legislature.
We do not, indeed, understand that these principles are questioned on behalf of the plaintiff in error. What is claimed is that the subject- matter of the contract in question does not fall within the range of the police power of the state. It is argued that, 'while it may be true that a viaduct over railroad tracks located across a public street may be essential to the public safety, it does not follow that a legislative enactment impairing the obligation of an existing contract is necessary to secure its construction and maintenance, and that any attempt upon behalf of the state to establish a viaduct through such legislation, however necessary the viaduct itself may be to the public safety, would be an invasion of the federal jurisdiction, unless adopted under the compulsion of state necessity; that, while it is not questioned that the [170 U.S. 57, 73] maintenance of the viaduct is essential to the safety of the community, yet, if existing contract obligations devolve this burden upon the city, the legislature of the state cannot, under the plea of public necessity, pass a law imposing it upon the plaintiff in error, without bringing the act within the prohibitions of the federal constitution.'
Before considering this proposition, it is proper to observe that it proceeds upon the assumption that, by the agreement between the parties in the present case, the duty of repairing and maintaining the viaduct was put upon the city. But an examination of the terms of the contract fails to show that this assumption is well founded. Certainly, h ere is therein no express provision or stipulation that, after the viaduct had been constructed, its future repair and maintenance should be at the cost of the city. It is, however, contended that, as the viaduct when constructed became a part of Eleventh street, and as the law implies a duty on the city to keep its streets in a safe condition, such a duty entered into this contract as a part thereof, and therefore the city, by the execution of the contract, became bound to keep the viaduct in repair. On the other side, however, it was equally made the duty of the railroad company by the statute of Nebraska, under which this agreement was made, 'to maintain and keep in good repair all bridges, with their abutments, which such corporation shall construct for the purpose of enabling their road to pass over or under any turnpike, road, canal, watercourse, or other way.'
While, therefore, it is the equal duty of the city and of the railroad company to guard the safety of the public by the erection and maintenance of a proper crossing or viaduct, it does not follow that, in the absence of an express agreement to that effect, such a duty is, by implication of law, devolved upon one party to the relief of the other. Indeed, the contract in question shows that, in consideration of their mutual duty to the public, the parties participated in the expense of the construction of the viaduct; and it would seem to be a reasonable implication that there should be a common obligation to keep it in repair.
However this may be, we think that, in view of the para- [170 U.S. 57, 74] mount duty of the legislature to secure the safety of the community at an important crossing within a populous city, it was and is within its power to supervise, control, and change such agreements as may be, from time to time, entered into between the city and the railroad company in respect to such crossing, saving any rights previously vested. Any other view involves the proposition that it is competent for the city and the railroad company, by entering into an agreement between themselves, to withdraw the subject from the reach of the police power, and to substitute their views of the public necessities for those of the legislature.
This subject has been so often considered by this court that it seems needless to here enlarge upon it. It is sufficient to cite a few of the cases. Beer Co. v. Massachusetts, 97 U.S. 25 ; Fertilizing Co. v. Hyde Park, Id. 659; New Orleans Gaslight Co. v. Louisiana Light & Heat Producing & Mfg. Co., 115 U.S. 650 , 6 Sup. Ct. 252; Mugler v. Kansas, 123 U.S. 623 , 8 Sup. Ct. 273.
In New York & N. E. R. Co. v. Town of Bristol, 151 U.S. 556 , 14 Sup. Ct. 437, the subject was elaborately considered, and it was there held that an act of the state of Connecticut relating to railway crossings, being directed to the extinction of grade crossings as a menace to public safety, was a proper exercise of the police power of the state; that there is no unjust discrimination and no denial of the equal protection of the laws, in regulations regarding railroads, which are applicable to all railroads alike; ascertainment of the result in a mode suited of the entire expense of a change of grade at a hightway crossing is no violation of the constitution of the United States, if the statute imposing it provides for an ascertainment of the result in a mode suited to the nature of the case. It is true that in that case there was a provision in the charter of the railroad company reserving a right to the legislature to alter and amend the same; but this court based its reasoning and conclusion entirely upon the police power of the state. The following language of the supreme court of Connecticut was quoted with approval: 'The act, in scope and purpose, concerns protection of life. Neither in intent nor in fact does it increase or diminish the assets of either the city or of the [170 U.S. 57, 75] railroad companies. It is the exercise of the governmental power and duty to secure a safe highway. The legislature, a ving determined that the intersection of two railways with a highway in the city of Hartford at grade is a nuisance, dangerous to life, in the absence of action on the part either of the city or of the railroads, may compel them severally to become the owners of the right to lay out new highways and new railways over such land, and in such manner as will separate the grade of the railways from that of the highway at intersection; may compel them to use the right for the accomplishment of the desired end; may determine that the expense shall be paid by either corporation alone, or in part by both; and may enforce obedience to its judgment.'
Wabash R. Co. v. City of Defiance, 167 U.S. 88 , 17 Sup. Ct. 748, was a case much like the present one. It was there held, affirming the supreme court of Ohio, that the legislative power of a city may control the question of grades and crossings of its streets, and a power to that effect, when duly exercised by ordinances, will override any license or consent previously given, by which the control of a certain street had been surrendered; that such matters cannot, from their public nature, be made the subject of a final and irrevocable contract.
Another ground of complaint is that the act in question delegates to the municipality authority, in cases where two or more railway companies own or operate tracks across public streets, to impose the cost and expense of constructing and maintaining viaducts over the same upon either or any of such companies, and that the city ordinance, in execution of such authority, imposes upon two of the four companies named in the record the entire expense of the repairs in question; and this is said to deny the plaintiff in error the equal protection of the law.
It is true that, by virtue of agreements between the Union Pacific Railway Company and the Chicago, Mailwaukee & St. Paul Railroad Company and the Chicago, Rock Island & Pacific Railroad Company, the two latter companies were using certain tracks belonging to the former which were under said viaduct. But it is not easy to see why the [170 U.S. 57, 76] plaintiff in error can complain that the city omitted to bring those companies in as parties. The nature and extent of their rights under the agreements with the Union Pacific Railway Company do not appear, and, for aught that is disclosed in this record, it may have been a feature of those agreements that the Union Pacific should protect them from any charge or exaction of the kind in question.
Again, it is said that the apportionment made by the ordinance of the extent of the repairs, one-third to the plaintiff in error, and two-thirds to the Union Pacific Railway Company, was arbitrary, without notice, and contrary to plain principles of justice and equality.
But if, as we have seen, it would have been competent for the legislature to have put the burden of these repairs upon one of the parties, or to have apportioned them among the parties, as it saw fit, so it may make a due apportionment through the instrumentality of the city council. The latter was not directed to proceed judicially, but to exercise a legally delegated discretion.
In State v. Missouri Pac. Ry. Co., 33 Kan. 176, 5 Pac. 772, the power of the city of Atchison to compel the respondents to construct viaducts was sustained under legislation similar to that herein involved, and, referring to the subject of notice, the court, per Judge Valentine, said: 'We do not think it necessary that the city should have given the railroad companies notice, before passing the ordinance, requiring them to construct the viaduct. Notice afterwards, with an opportunity on the part of the railroad companies to contest the validity of the ordinance and the right of the city to compel them to construct the viaduct, is sufficient.'
Health Department of New York v. Rector, etc., of Trinity Church, 145 N. Y. 32, 39 N. E. 833, was the case of an action to recover a penalty under a statute requiring all tenement houses to be supplied with water on each flooro ccupied or intended to be occupied by one or more families, whenever so directed by the board of health. The statute made no provision for notice to property holders, and none in fact was given, while it was admitted that it would cost the respondent a considerable sum of money to comply with the order of the board. [170 U.S. 57, 77] In the opinion of the court, per Peckham, J., it was said: 'The legislature has power, and has exercised it in countless instances, to enact general laws upon the subject of the public health or safety, without providing that the parties who are to be affected by those laws shall first be heard before they shall take effect in a particular case . ... The fact that the legislture has chosen to delegate a certain portion of its power to the board of health would not alter the principle, nor would it be necessary to provide that the board should give notice and afford a hearing to the owner before it made such order. ... Laws and regulations of a police nature, although they may disturb the enjoyment of individual rights, are not unconstitutional, though no porvision is made for compensation for such disturbance. They do not take private property for public use, but simply regulate its use and enjoyment by the owner. If he suffer injury, it is either damnum absque injuria, or, in the theory of the law, he is compensated for it by sharing in the general benefits which the regulations are intended and calculated to secure.'
So, in the present case, while no notice may have been given to the railroad companies of the pendency of the ordinance, and while they may not have been invited to participate in the proposed legislation, yet they had an opportunity to, and did in fact, put in issue, by the answer, both the validity of the ordinance and the reasonableness of the amount apportioned to them respectively for the repair of the viaduct in question.
The validity of the statute and of the ordinance having been passed upon and upheld by the courts of the state, it is not the function of this court, apart from the provisions of the federal constitution supposed to be involved, to declare state enactments void, because they seem doubtful in policy, and may inflict hardships in particular instances.
The judgment of the supreme court of Nebraska is accordingly affirmed.
The CHIEF JUSTICE took no part in the hearing and decision of the case.