
    STATE ex rel. CITY OF ST. PAUL v. MINNESOTA TRANSFER RAILWAY COMPANY.
    
    June 1, 1900.
    Nos. 11,949 — (47).
    Railway — Rights Held for Benefit of Public.
    A railroad company is a quasi public corporation, and all its rights and powers are conferred upon it, not merely for the benefit of the corporation itself, but also in trust for the benefit of the public; and, whenever it neglects or fails to perform any of its corporate duties, it may generally be compelled to perform the same by mandamus.
    Mandamus to Compel Maintenance of Bridge.
    Mandamus will lie to compel a railway company to construct and maintain proper crossings, such as viaducts or bridges, and suitable approaches thereto, at all points where their lines of railway intersect previously established public, thoroughfares, if .such crossings are necessary for public use.
    Railway — Duty at Common Law.
    At common law the duty rests upon a railway corporation, when it occupies a public thoroughfare with its tracks, to restore the same, by some reasonably safe and convenient means, to its former condition of usefulness. And the duty is a continuing one, and the way must be kept in repair by the corporation whose act has made the duty necessary.
    Contract with Municipal Corporation Ultra Vires.
    Assuming in this case that the relator city entered into a contract with defendant railway company of the nature set out in the answer herein, it is held, such contract was ultra vires and of no validity. It was not binding upon either party.
    Municipal Corporation — Contract in Perpetuity Invalid.
    Where the duty rests upon a railway corporation to restore a public way to its former condition of usefulness, a municipality cannot enter into a valid contract with such corporation whereby it surrenders its power to compel the performance of such duty. It cannot contract with such corporation that it will “maintain” a certain bridge, to be erected by either or both parties, “for all future time.” Such an agreement on the part of a municipality is beyond the power of municipal officers, is contrary to public policy, and of no effect.
    Same — Notice of Power to Contract.
    It is a general and fundamental principle of law that all persons contracting with a municipal corporation must, at their peril, inquire into the power of the corporation or its officers to make a contract.
    Estoppel of Municipal Corporation.
    A municipality is not estopped in such a ease to assert the invalidity of the contract by the fact that a bridge has been built by both parties, as the result of a compromise between the municipal authorities and the railway officials, and has thereafter been kept in repair by the municipality for a number of years.
    Sp. Laws 1885, c. 7, § 3.
    
      Held, that it was not intended by the legislature, when enacting a charter provision of the relator city (Sp. Laws 1885, c. 7, § 3), to relieve railway corporations from the common-law duty before mentioned.
    Appeal by defendant from an order of the district court for Ramsey county, Brill, Otis, and Bunn, JJ., directing the issue of a writ of peremptory mandamus requiring defendant to repair a bridge in accordance with plans and specifications.
    Affirmed.
    
      W. H. Norris, for appellant.
    The order of the court below was in defiance of G. S. 1894, § 5976. If defendant is bound to repair, the city can, after demand, make the repairs reasonably necessary and recover their cost. Elliott, Roads & S. § 604; Pennsylvania v. Borough, 85 Pa. St. 336; Well-come v. Inhabitants, 51 Me. 313. See Baker v. Marshall, 15 Minn. 136 (177); State v. Southern Minn. R. Co., 18 Minn. 21 (40); State v. Nelson, 41 Minn. 25, 26.
    The contract under which this bridge was built was valid. Public officers are presumed to do their duty. When a contract is not on its face necessarily beyond the power of a corporation it will, in the absence of proof to the contrary, be presumed to be valid. Corporations are presumed to contract within their powers. Railway Co. v. McCarthy, 96 U. S. 258, and cases cited at page 267. The city had power to build this bridge and its approaches. See City v. Atchison, 55 Kan. 730; State v. Ensign, 54 Minn. 372; Philadelphia Co.’s Appeal, 121 Pa. St. 44; Walla Walla City v. Walla Walla W. Co., 172 U. S. 1; 1 Dillon, Mun. Corp. (3d Ed.) §§ 450, 451.
    Whether or not the compromise was strictly valid, relator is estopped. The doctrine of ultra vires when invoked for or against a corporation should not be allowed to prevail where it would defeat the ends of justice, or work a legal wrong. Railway Co. v. McCarthy, supra. Where a contract has been fully performed and one party is not restorable to status quo, the doctrine of ultra vires is not admissible. Chapman v. Iron, 62 N. J. L. 497; Hitchcock v. Galveston, 96 IJ. S. 341. The city is estopped to urge irregularity in the exercise or execution of power. Moore v. Mayor, 73 N. Y. 238. It is estopped by the positive acts of its officers inducing action and heavy expenditure on the part of defendant, because retraction would be inequitable. Martel v. City, 94 111. 67; Chicago v. City, 79 111. 25. The contract was valid as a compromise, even if the city exceeded, or sacrificed, its rights. Stapilton v. Stapilton, 1 Atkyns, 2; 1 Chitty, Cont. (11th Ed.) 46, note 1; Davenport v. Wheeler, 7 Cow. 231; ü. S. v. Child & Co., 12 Wall. 232, 240; Battle v. McArthur, 49 Fed. 715; Philadelphia Co.’s Appeal, supra; Cincinnati v. Incorporated, 36 Oh. St. 631; In re petition of Mayor, 158 Mass. 299; Selectmen v. New York, 161 Mass. 259; Boston v. Inhabitants, 156 Mass. 217.
    
      J ames E. Marfoham, for respondent.
    Mandamus is the proper remedy. Munn v. Illinois, 94 U. S. 113; State v. St. Paúl, M. & M. Ry. Co., 35 Minn. 131, 138; High, Extr. Leg. Rem. § 320; Merrill, Mand. § 158; State v. Missouri, 33 Kan. 176; People v. Chicago, 67 111. 118; Indianapolis v.- State, 37 Ind. 489; Boggs v. Chicago, 54 Iowa, 435; State v. Hannibal, 86 Mo. 13; Cummins v. Evansville, 115 Ind. 417; People v. Dutchess, 58 N. Y. 152; State v. St. Paul, M. & M. Ry. Co., 38 Minn. 246; State v. Minneapolis & St. L. Ry. Co., 39 Minn. 219.
    The' duty rested on defendant, not only to construct, but to maintain, a suitable bridge or crossing over its tracks where they intersect an existing street. State v. St. Paul, M. & M. Ry. Co., supra; People v. Chicago, supra; Pennsylvania v. Borough, 85 Pa. St. 336; Cooke v. Boston, 133 Mass. 185; State v. Hannibal, supra. The facts pleaded by defendant do not constitute an answer or defense. Every reasonable doubt is to be resolved adversely to the immunity asserted. Nothing is to be taken as conceded, but what is given in unmistakable terms or by an implication equally clear. This doctrine is vital to the public welfare. Fertilizing Co. v. Hyde Park, 97 U. S. 659; Long v. City of Duluth, 49 Minn. 280. The pretended contract set up in the answer was unreasonable, contrary to public policy, and beyond the power of the officers of the city. 1 Dillon, Mun. Corp. § 458. A municipal corporation intrusted with power of control over public streets cannot, by contract or otherwise, irrevocably surrender any part of such power without the explicit consent of the legislature, because such power is in the nature of a trust held by the corporation for the state. Nash v. Lowry, 37 Minn. 261. Such corporations have no power to make contracts or pass by-laws which shall cede away, control, or embarrass iheir legislative or governmental powers, or which shall disable them from performing their public duties. 1 Dillon, Mun. Corp. § 97; Flynn v. Little Falls E. & W. Co., 74 Minn. 180; Long v. City of Duluth, supra. All persons contracting with a municipal corporation must, at their peril, inquire into the power of the corporation or its officers to make the contract. 1 Dillon, Mun. Corp. § 447.
    
      
       Reported in 83 N. W. 32.
    
   COLLINS, J.

Appeal from an order directing that a peremptory writ of mandamus issue, requiring and compelling the defendant transfer-railway company to proceed forthwith to repair the bridge described in the pleadings in accordance with certain plans and specifications attached to, and made a part of, the petition for such writ.

The bridge in question is the one now in use upon University avenue, in the city of St. Paul. It is more than thirteen hundred feet in length, and is an overhead crossing of a large number of defendant’s tracks, which have been laid over the avenue at grade, and have been, and now are, in constant use as a part Of defendant’s system of transfer tracks. The latter are close together, cross the avenue obliquely, and occupy a space of about three hundred fifty feet in width, — a little more than one-third of the length of the bridge. The defendant’s land has not far from thirteen hundred feet frontage on the avenue, so that the bridge practically spans the entire tract. An overhead crossing having become necessary, the president of defendant company made a proposition in writing to plaintiff’s common council to construct the same of a certain width, and in accordance with plans to be satisfactory to the city engineer. Conditions were imposed upon the city, in the proposition, as follows:

“The city of St: Paul to agree to construct all the necessary approaches on both ends of said bridge, and pay any damages to owners of property abutting on said approaches; and, on the completion of the bridge in accordance with the plans as accepted by the city engineer, the city of St. Paul is to maintain the same for all future time. The city of St. Paul to further agree to prohibit all crossing at grade of tracks of the Minnesota Transfer Railway Company after the said bridge is completed, ready for use; and, in the event that permission is given by said city to any company to construct a motor line, an elevated railroad, or any other railway upon University avenue across the grounds of the Minnesota Transfer Railway Company, such road shall not be permitted to cross the tracks of the transfer company at grade, but upon a bridge to be constructed at the expense of said elevated railroad or motor line, and in no manner at the expense of the Minnesota Transfer Railway Company; and no permission shall be given any elevated railroad or motor line to build a bridge over the tracks of this company on University avenue, unless, coupled with such permission, it is required that the bridge be built to conform to that which the Minnesota Transfer Railway Company hereby proposes to build, so far as length of spans and clearance above the rails of the tracks of the Minnesota Transfer Railway Company are concerned.”

In addition, the proposition was made subject to approval by defendant’s board of directors. Later the city council instructed, by resolution, the proper officers to enter into a contract with defendant corporation for the construction of the bridge in accordance with the proposition. The bridge was built at an expense of about $98,000 to defendant, and of about $25,000 to the city. It was much more of a structure than defendant deemed necessary for public use at the time, but, according to the answer, defendant

“Participated in the construction thereof, relying upon the good faith of said city and of its officers and common council, and upon the aforesaid acceptance of said proposition and report as a valid and permanently binding agreement of said city to maintain and repair the said bridge for all future time, and at its own sole expense.”

And evidently it was much longer than was necessary for the protection of the public when crossing defendant’s tracks. It is further averred in the pleading just mentioned that ever since its construction the city has maintained the bridge, and every part, and has made all repairs thereon, except in one instance, where the damages were occasioned by a collision of cars operated by defendant itself. The order for judgment was upon the petition and answer.

1. It is argued by defendant’s counsel that the order appealed from was in plain defiance of G. S. 1891, § 5976, for the reason that there is a plain, speedy, and adequate remedy in the ordinary course of law. The suggestion of counsel is that, if defendant is bound to repair the bridge in question, the plaintiff city can, after demand, make the necessary repairs, and in an action at law recover their cost from his client. •

Two cases are cited by counsel in support of this claim. Pennsylvania v. Borough, 85 Pa. St. 336, and Wellcome v. Inhabitants, 51 Me. 313. Neither is in point. If defendant is bound to make the necessary repairs, the estimated cost being upwards of $10,000, the character and extent thereof is a question which neither the company nor the city can determine absolutely without the assent of the other. Like all matters involving a controversy concerning public duty and private right, it is to be adjusted, and settled by judicial inquiry and determination. The plans and specifications prepared by the relator’s engineer and approved by its common council, and the direction to the defendant to repair the bridge in accordance with such plans and specifications, were not conclusive upon the defendant, and did not fix and establish the measure of its duty with reference to these repairs. These are matters, if put in issue, for the determination.of the court upon any hearing. If the city should make repairs, and attempt to recover the cost of defendant, the latter would deny any liability, and would unquestionably defend upon the further ground that it had been given no opportunity to be heard when the necessity arose, and that the character and extent of the repairs could not be determined by the city alone. The latter would be unable to have these matters passed upon in advance, and when making repairs would be simply taking the chances on its acts being afterwards approved and sustained by the courts. If this be so, it had no plain, speedy, or adequate remedy at law, and could therefore proceed as it did.

The general rule is that “a railroad company is a quasi public corporation, and all its rights and powers are conferred upon it not merely for the benefit of the corporation itself, but also in trust for the benefit of the public; and whenever it neglects or fails to perform any of its corporate duties, it may generally be compelled to perform the same by an action of mandamus.” State v. Missouri, 33 Kan. 176, 5 Pac. 772. See also State v. St. Paul, M. & M. Ry. Co., 38 Minn. 246, 36 N. W. 870; State v. Minneapolis & St. L. Ry. Co., 39 Minn. 219, 39 N. W. 153; State v. St. Paul & D. R. Co., 75 Minn. 473, 78 N. W. 87; High, Extr. Leg. Rem. § 320. Mandamus is certainly a suitable form of action to try the questions involved here.

2. The duty rested upon the defendant corporation, when it occupied the avenue with its tracks, to restore the same, by some reasonably safe and convenient means, to its former condition of usefulness. And this duty was a continuing one. The common-law rule is that, where a person or a corporation is given the right to build a railroad across a public highway, it cannot be destroyed as a thoroughfare, but the party obtaining such right is bound to restore or unite such highway at his own expense by some reasonably safe and convenient means of passage. No statute imposing this duty is necessary.

“This duty includes the doing of whatever is necessary to be done to restore the highway to such condition; as, for instance, in case of a bridge, the approaches or lateral embankments, without which the bridge itself would be useless. This duty is founded upon the equitable principle that it was their act, done in pursuit of their own advantage, which rendered this work necessary, and therefore they, and not the public, should be burdened with its expense.” State v. St. Paul, M. & M. Ry. Co., 35 Minn. 131, 133, 28 N. W. 4, and cases cited.

And, if a performance of this duty makes it necessary to build a bridge, it is equally as necessary that it should be kept in repair. It must be maintained while the duty continues, that the public may be suitably provided for. The person or corporation creating the necessity can only be released from the duty by some act of the legislature. This rule is not very seriously disputed by defendant’s counsel, but his position is that by reason of an acceptance of the proposition made to the city, to which we have referred, and the building of the bridge therein mentioned in accordance with plans prepared by the city engineer, defendant was relieved from any further duty in respect to the University avenue crossing, and is no longer liable under the common-law rule as to repairs and future maintenance.

3. While having under consideration defendant’s claim of a grant of perpetual immunity from its otherwise binding obligation to keep the bridge in repair, we shall assume what is denied by the city attorney in his argument, — that the city did enter, in so far as it could, into a contract with defendant corporation to build a part of this bridge as proposed by defendant’s president, and that in this contract the city accepted and agreed to abide by the conditions contained in the proposition, hereinbefore quoted in full, —one being that it was to maintain the structure “for all future time,” — and that the bridge in question was built and completed in strict compliance with a duly-executed contract, in all matters of form. The question then is, was it within the power, express or implied, of the city officials to enter into an agreement of this character which would be of any validity?

Not only did the council appropriate city funds to and in the construction of a bridge which, in so far as it crossed the railway tracks, was made necessary by defendant’s acts, and which, as a consequence, defendant was obliged wholly to construct, but it accepted conditions, and attempted to bind the municipality, for all future time, to maintain this bridge at that particular point. Without regard to what might be needed by the public at some future period, the council attempted to bind the city to repair and to keep in existence for all time a bridge but one-half as wide as the avenue across which defendant had laid a large number of tracks, evidently used as part of its transfer yard, and not merely for ordinary crossing purposes. The council went further than this. It attempted to bind the city not to cross the tracks at the surface grade or otherwise, nor to allow any street-car or traction company so to do, or to so cross at any other grade than that fixed by the height of the bridge.

If such a contract could be upheld, the city, 'without any consideration whatever, and as a gratuity, gave away and waived, as was said by the court below, “a most valued right given to it at common law, viz. the right to compel the respondent to provide and forever maintain suitable and safe crossings on University avenue over its tracks and other grounds, a distance of over thirteen hundred feet, and it relieved the respondent for all time from any and all obligations in that behalf.” Such an arrangement, ignoring entirely the question of consideration, was ultra vires. It was not binding on either party. It cannot be that the common council of 1888, by the passage of a resolution providing for the construction of a bridge sixty feet in width in a street one hundred twenty feet wide, to be perpetually maintained by the city, could limit or control the legislative action of its successors, or could abdicate its right, as future necessity should require, to compel the construction and maintenance of a bridge or viaduct of such dimensions, width, and construction as should, as nearly as may be, restore the street to its former condition of usefulness.

'We have already held that the power of municipal authorities to contract in relation to a given matter does not carry with it, by implication, power to make a contract, even with reference to such matter, which shall cede away, control, or embarrass their legislative or governmental powers, or render the municipality unable in the future to control any municipal matter over which it has legislative control (Flynn v. Little Falls E. & W. Co., 74 Minn. 180, 186, 77 N. W. 38, 78 N.W. 106; State v. St. Paul City Ry. Co., 78 Minn. 331, 81 N. W. 200); and also that a municipal corporation intrusted with power of control over public streets cannot, by contract or otherwise, irrevocably surrender any part of such power, without the explicit consent of the legislature, because such power is in the nature of a trust held by the corporation for the state (Nash v. Lowry, 37 Minn. 261, 33 N. W. 787). And, of course, it is a general and fundamental principle of law that all persons contracting with a municipal corporation must, at their peril, inquire into the power of the corporation or its officers to make the contract. Future eonditions may require that the public thoroughfare be restored to its normal condition, so that there may be a grade crossing for all persons who may have occasion to cross on foot or in vehicles. This would compel the defendant’s tracks to be put overhead or underneath the surface. And .it is not improbable that in time the traveling public may need, for its use, the full width of the avenue, one hundred twenty feet, instead of the sixty feet now accorded. These things would be absolutely prohibited, should we sustain defendant’s contention. The alleged contract was and is invalid.

Counsel for defendant has cited the case of State v. Ensign, 54 Minn. 372, 56 N. W. 41, as in conflict with State v. St. Paul, M. & M. Ry. Co., supra. But there is no conflict, for the case first mentioned was not an action brought to compel a railway company to restore a street which it had crossed with its tracks to its previous state of usefulness, by bridging or otherwise. It was a proceeding under the charter of the city of Duluth, in which a viaduct had to be built over railway tracks in connection with, and as a part of, a street improvement. A bridge over the tracks would have been a detriment, instead of what was required, — an-improvement. The city, instead of assessing the benefits arising to the railway company, if any, accepted $50,000 from the latter in lieu of an assessment, and then assessed benefits to other property as provided by the charter. More than this, there was nothing in the record in that case which tended to show that the street involved had been laid out or used as a public thoroughfare before the railway company laid its tracks, and therefore no duty of the company, at common law or by statute, was shown to have been neglected.

Counsel also urges that, as this bridge was the result of a compromise between the city and the defendant, the former is estopped from asserting the claim now made upon the latter. It was, urges counsel, the finality of a fair and intelligent compromise. We are justified in saying that a very large proportion of bridges built by railway companies over their tracks, where highways are crossed, are the result of compromises, — many of them, the result of protracted litigation. There is frequently a difference of opinion between railway officials and -city authorities as to when a necessity arises, and what is needed in the way of structures. Estoppel in this case, or in any other where a plain duty rests upon a party, cannot be predicated upon the compromise of some difference of opinion as to exactly what the performance of that duty requires. The rule relied on by counsel, that the doctrine of ultra vires, when invoked for or against a corporation, should not be allowed to prevail where it would defeat the ends of justice or work a legal wrong, is against him; for here the ends of justice will be subserved by compelling the defendant to perform its duty. And no legal wrong is done to his client by compelling it to abide by its legal obligation to provide and maintain a suitable crossing over its tracks.

We have referred to the claim of counsel that, under its charter, defendant was authorized to construct this bridge, and also to maintain it. It is true that by virtue of a charter provision (Sp. Laws 1885, c. 7, § 3 [p. 68]) the city is given power to build “any bridge or bridges, and also the needful approaches thereto in any street or streets or highway or highways of said city over railway tracks or other places.” If the legislature had intended to relieve railway corporations from the duty imposed at common law in reference to public ways already in use, and then crossed by railway tracks, apt language would have been found in which to express the rule. As the section reads, we should have to infer altogether too much as to such intent.

We are of opinion that an agreement on the part of the city to maintain this bridge for all time was beyond the power of the officers of the city, contrary to public policy, void, and of no effect, and that the order of the court below directing a peremptory writ of mandamus should be affirmed. It is so ordered.  