
    CHICAGO, BURLINGTON AND QUINCY RAILROAD COMPANY v. NEBRASKA, ex rel. OMAHA.
    ERROR TO THE SUPREME COURT OE THE STATE OE NEBRASKA.
    No. 178.
    Argued January 10, 11, 1898.
    Decided April 11, 1898.
    A Federal question was specifically presented in the trial of this case both in the trial court and at the hearing in error before the Supreme- Court of the State, and the motion to dismiss cannot be allowed.
    This court, when reviewing the final judgment of a state court, upholding - a state law alleged to be-in violation .of .the contract clause of the Com stitution, must determine for itself the existence or the non-existence of the contract set up,, and whether its obligation has been impaired by the state law.
    The contract between the city of Omaha, the Union Pacific Bailway Company, and the Omaha & Southwestern Railroad Company of February 1, 1886, (founded upon the act of Nebraska of March 4, 1885, relating to •viaducts, bridges and tunnels in cities,) providing for the building of a viaduct along Eleventh street in Omaha, at the expense of the two railroad companies, was 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; but it wa'S not a contract whose continuance’ and operation could not be affected or controlled by subsequent legislation.
    ■When the subject-matter of such a contract is one which affects the safety and welfare of the public, the contract is within the supervising power and control of the legislature, when exercised to protect the public safety, health and morals, and the clause of the Federal Constitution which protects contracts from legislative action cannot, in every case, be successfully invoked.
    In view of the paramount duty of a state legislature to secure the safety of the community at an important' railroad' crossing within a populous city, it was apd is within its power to supervise, control and change agreements from time to time entered into between the city and the railroad company as to a viaduct over such crossing, saving any rights previously vested.
    It is competent for the legislature of the State to put the burden of the repairs of such a viaduct crossing several railroads upon one of the companies, or to apportion it among all, as it sees fit; and an apportionment may be made through the instrumentality of the City Council.
    The State of Nebraska, on tbe relation of the city of Omaha, filed its petition in the district court of the fourth judicial district of Nebraska on January 19, 1895, asking judgment for the issuing of a writ of mandamus requiring the Chicago, Burlington and Quincy Railroad Company to repair, in accordance with the directions of a city ordinance enacted under certain statutes of the state legislature, the south one-third of the viaduct at Eleventh street in the city of Omaha, a structure forming a part of that street, and spanning a number of railroad tracks, one of which was owned and used by the said company, the others being owned by the Union Pacific Railway Company and used by it and two other companies. The defendant filed its answer on March 6, 1895, alleging. therein, amongst other things, that the legislature of Nebraska had no power to impose upon the defendant the duty of maintaining orrepairing the viaduct, for the reason that to do so would be in violation of the obligations of the contract, hereinafter described, under which the viaduct was constructed, and contrary to the provisions of the Constitution of the United States. At the trial of the case evidence was adduced by both parties, but there was substantially no dispute respecting the facts, the controversy having relation only to the validity, interpretation and effect of legislative enactments and to the validity of city ordinances.' On May 1, 1895, the court entered judgment in favor of the city, and directed that a peremptory writ of mandamus issue to the defendant company, commanding and requiring it to make the repairs in question, the same to be commenced immediately and carried forward without unnecessary delay. The defendant, having been- denied a new trial, took the case on writ of error to the Supreme Court of the State, and upon the affirmance by that court of the judgment of the said district court, sued out • a writ of error bringing the case, here, alleging in its assignment of errors that the statutes of Nebraska, which were held by the Supreme Court of that State to be valid, and to require the company to make the said repairs, were repugnant to the Constitution of the United States because they impaired the obligation ‘ of contracts, abridged the company’s privileges and immunities, deprived it of its property without due process of law, and denied to it the equal protection of the laws, and that the judgment enforcing those statutes was therefore erroneous.
    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' and Missouri Hi ver Kailroad Company in Nebraska, a corporation of the State of Nebraska, which company was the lessee of the Omaha and Southwestern Kailroad Company, a corporation organized in the year 1869 under chapter 25, Kevised Statutes of Nebraska of 1866. That chapter contains, among other provisions, the following:
    “Sec. 83. If it shall be necessary, in the location of any part of any railroad, to occupy any road, street, alley, or public way or ground of any kind, or any part thereof, it shall be competent for the municipal or other corporation or public officer or public authorities, owning or having charge thereof, and the railroad company, to agree upon the manner, and upon the terms and conditions upon which the same may be used or occupied; and if said parties shall be unable to agree thereon, and it shall be. necessary, in the judgment of the directors of such railroad company, to use or occupy such road, street, alley or other public way or ground, such company may appropriate so much of the same as may be necessary for the purposes of such road, in the same manner and upon the same terms as is provided for the appropriation of the property of individuals by the eighty-first section of this chapter. . . . Sec. 86. Any railroad company may construct and carry their railroad across, over or under any road, railroad, canal, stream or watercourse, when it may be necessary in the construction of the same; and in such cases said corporation shall so .construct their' railroad crossings as not unnecessarily to impede the travel, transportation or navigation upon the road, railroad, canal, stream or watercourse so crossed. . . . Sec. 103. Every railroad corporation shall 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.”
    On May 14,' 1884, an ordinance of the city of Omaha was. approved, granting to the Omaha and Southwestern Eailroad 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:
    “Said Omaha and Southwestern Eailroad Company .shall have the right to construct, maintain and operate a line of railroad along, upon, through and across said portions of said streets and alleys as a part of its line; Provided, that said railroad track and tracks are constructed so as to conform to the grade of said street as near as may be, and so as to interfere as little as possible with the travel along and upon said streetsand,- provided, that nothing herein contained shall be construed as interfering with the right of any property owner to recover from said company any damages resulting to private property by reason of the construction of said railroad, and nothing herein granted shall authorize any interference with the tracks of the Union Pacific Railway Company now laid and operated by said Union Pacific Railway Company in’ any portions of the streets and alleys herein named and enumerated.”
    On March.!, 1885, ah 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 and Southwestern Railroad Company, the-lessor of' the defendant company, executed an agreement in writing February 1, 1886, providing, amongst other things, for the construction of a viaduct on Eleventh street across the tracks of- those companies. The agreement was in part as. follows:
    “That the said parties of the second part, [the Union-Pacific Railway Company and the Omaha ’and Southwestern Railroad .Company,] in pursuance of the provisions of an act of the legislature of the State of Nebraska, entitled f An act to provide for viaducts, bridges and tunnels in certain cases, in cities of' the.first class,’ do hereby assume and agree to pay as may be required by the mayor and city council of said city three-fifths of the entire cost of constructing a viaduct along Eleventh street 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 ninety thousand dollars, ($90,000) the amount so assumed and agreed to be paid, being three-fifths .of the entire cost and damages, to be proportioned between said parties of the second part, as follows : Three-fourths thereof to be paid by said Union Pacific Railway Coiiipany and one-fourth thereof to be paid by said Omaha and Southwestern Railroad Company. . . .
    The plans and specifications for said viaducts before contracts for the construction thereof are entered into, shall be-submitted to and approved by said parties of the second part, and should plans and specifications be adopted by said party «of the first part, and approved by said party of the second part, which shall increase the. said cost and damages beyond the amounts herein limited, then the said parties of the second . part are to'pay their respective proportions of said increased' cost and damages, in the samp manner ant according to the same division as hereinbefore agreed.”
    Under the provisions of this agreement the viaduct was built, and in .1887 it was opened to the use of the public. On March 30 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 of Nebraska, 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, Laws of Nebraska, 1893, c. 3, is as follows:
    “Sec. 48. 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. "Whenever any such viaduct shall be deemed and declared by ordinance necessary for the safety and protection of the public, the mayor and ■ council shall provide for appraising, assessing' and determining the damage, if any, which may be caused to any property by reason of the construction of such viaduct and its approaches.
    “ The proceedings for such purpose shall be the stale as’provided herein for the purpose of determining damages to property owners by reason of the grading of a street, and such damages shall be paid by the city, and may- be assessed by the city council against property benefited.
    ' “ The width, height and strength of any such viaduct, an‘d the approaches thereto, the material therefor, and the manner of the construction thereof, shall be as required by the board of public works, as may be approved by the mayor and council.
    “ When two- or more railroad companies own or operate, separate lines of track to be crossed by any such viaduct, the proportion thereof, and the approaches thereto, to be constructed by each, or the cost to be borne by each, shall be determined by the mayor and council.
    “ It shall be the duty of any railroad company or. companies upon being required as herein- provided to erect, construct, reconstruct or repair any viaduct, to proceed within the time and in the manner required by the mayor and council, to erect, construct, reconstruct or repair the same, and it shall be a misdemeanor for any railroad company or companies to •fail, neglect or refuse to perform- such duty, and upon'conviction any such company or companies shall be fined one hundred dollars ($100) and each day any such company or companies shall fail, neglect or refuse to perform such duty shall be deemed and held to be a separate and distinct offence, and in addition to the penalty herein provided any such company or companies shall be compelled by mandamus or other appropriate proceeding to erect, construct, reconstruct or repair any viaduct as may be required by ordinance as herein provided. The mayor and council shall also have power whenever any railroad company or companies shall fail, neglect or refuse to erect, construct, reconstruct, or repair any viaduct or viaducts, after having been required so to do as herein provided, to proceed with the erection, construction, reconstruction- or repair of such viaduct or viaducts by contract or in such other manner as may be provided by ordinance, and assess the cost of the erection, construction, reconstruction or repair of, such viaduct or- viaducts against the property of the railroad company or companies required-to erect, construct, reconstruct or repair the same, and such cost shall be a valid and subsisting lien against such property,, and. shall also be a legal indebtedness of said company or companies in favor of such city, and may . be enforced and collected by suit in the proper court.”
    In May, 1890, the Union Pacific Railway Company, which now owns twenty-one-tracks crossing’Eleventh street beneath, the said viaduct, entered into agreements with the Chicago, Rock Island and Pacific Railway Company-and the Chicago^ Milwaukee and 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 twenty-one tracks, for the period of-999 years; Subsequently, in.that year, the said companies entered into possession of the • interests 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 189.2, 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 nepéssifcy 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:
    “An ordinance approving the plans and specifications submitted by the board • of public works for the repairing of the Eleventh street viaduct over the railroad tracks and ordering the impairing of said viaduct to be' done.
    “ Whereas, it has been and hereby is deemed and declared necessary for the safety and protection of the public that the Eleventh street viaduct be repaired as-herein required; and
    ■ “ Whereas, it is right,' proper and reasonable that the railroad companies owning or operating railway tracks across said Eleventh street should make -said repairs to said viaduct; therefore
    “ Be it ordained l>y the City Council of the City of Omaha : Section 1. That the plans and specifications submitted by the board of public works of the city of Omaha, December 15, 1893, for the repairs of the Eleventh street viaduct over the railroad tracks, upon and across Eleventh street, from a point near Jackson street to a point near Mason street, in the city of Omaha, as prepared by the city engineer of said city, be and the same are hereby approved and adopted.
    “ Sec. 2. That the Union Pacific-Railway Company be and is hereby ordered, directed and required to repair that portion of said Eleventh street viaduct from the north end of said viaduct south for a distance of two-thirds of the ’entire length of said viaduct; and the Chicago, Burlington and Quincy Railroad Company, grantee and successor to the Missouri River Railroad Company in Nebraska and the Omaha and Southwestern Railroad Company, be and is hereby ordered, directed and required to repair that portion of said Eleventh street viaduct commencing at the south end thereof, and extending northward a distance of one-third of the entire length of said viaduct; the said repairs to be m|ide in accordance with said plans and specifications, and to be done under the supervision of the city engineer; the said repairs to be commenced without unnecessary delay and fully completed, as herein required, within ninety days from the passage and approval of this ordinance.
    “ Sec. 3. That the city clerk be and is hereby directed to furnish to said Union Pacific Railway Company and to said Chicago, Burlington and' Quincy Railroad Company, owning or operating railroad tracks upon and across said Eleventh street under said Eleventh street viaduct,' a duly certified copy of this ordinance, without unnecessary delay, and that the city engineer is hereby directed to furnish, to each of said railroad companies a copy of said plans and specifications, and to superintend the work of making said repairs.
    “ Sec. 4. That this ordinance shall take effect and be in force from and after its passage.”
    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 samé. Wherefore the present proceeding was instituted as aforesaid. .
    
      
      Mr. Charles J. Greene for plaintiff in' error. Mr. Ralph W. Breckenridge was on his brief.
    
      Mr. W. J. Connell for defendant in error;
   Mr. Justice Shiras,

after stating the case, 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 answer 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 whéreof 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 laivs, charter and ordinances did not constitute a contract within the meaning and protection of the Constitution of the' United • States, guaranteeing 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 contention that the ordinance under which the city proceeded fin ordering the repairs in question contemplates the talcing 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 reeital, 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 non-existence of the contract set up, and whether its obligation has been impaired by- the state enactment. Jefferson Branch Bank v. Skelly, 1 Black, 436; Railroad Co. v. Rock, 4 Wall. 177; New Orleans Waterworks v. Louisiana Sugar Co., 125 U. S. 18; Mobile & Ohio Railroad v. Tennessee, 153 U. S. 486, 492.

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 and Southwestern Railroad Company on the first day of February, 1886.

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 cross 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 thé 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, and 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 apart and used towards the maintenance of such viaduct, bridge 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 ordinances, 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, and 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 ninety thousand dollars; 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 and 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, c. 10, Laws of Nebraska, 1887, 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 moro railroad companies own or operate separate lines of track, to be crossed' by any such viaduct, the proportion thereof, and of the approaches thereto, to be constructed by'each, or the cost to be 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, c. 3, Laws of Nebraska, 1893, 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 indebtedness 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 and Quincy Railroad, Company, as grantee and successor of the Omaha and 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, arid to be completed within ninety 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 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, lias 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 pri-' vate 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 no.t questioned that the 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 there 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 paramount 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 maybe, 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 bet ween, 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, 97 U. S. 659 ; New Orleans Gas Co. v. Louisiana Light Co., 115 U. S. 650 ; Mugler v. Kansas, 123 U. S. 623.

. In New York, & New England Railroad v. Bristol, 151 U. S. 556, 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 thé 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;- and that the imposition upon a railroad corporation of the entire expense of a change of grade at a high-' way 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 it? reasoning and conclusion entirely upon the polled 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 railroad companies. It is the exercise of the governmental power and duty to secure a safe highway. The legislature having 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 o'f 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 intersectionmay 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 Railroad Company v. Defiance, 167 U. S. 88, 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 surr rendered; 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 owning or operating 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, Milwaukee and St. Paul Railroad- Company and the' Chicago, Rock Island and 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 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 ¿.nd 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 Pacific Railway, 33 Kansas, 176, 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 that it is necessary that the city should have given the railroad- companies notice before passing the ordinance requiring them to construct the viaduct. Notice afterward, with an opportunity- on the -part of the railroad companies to contest the validity bf the ordinance and the.right of the city to compel them to; construct the viaduct, is sufficient.”

■Health Department v. Trinity Church, 145 N. Y. 32, was the case of an - action to recover a penalty under a statute requiring all tenement houses to be supplied with water On' each floor occupied 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 ©ost the respondent a considerable sum of money to comply With the order, of the board.

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 legislature 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, though they may disturb the enjoyment of individual rights, are not unconstitutional, though no provision is made for compensation for such disturbance. They do not appropriate 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.  