delivered the opinion of the Court:
In 1858 one Abner Reeves owned lots 26 to 46, inclusive, in block 63, in school section addition to Chicago, bounded on the north by Forquer street, on the east by Beach street, on the south by Taylor street, and on the west by an alley. In the year 1858 the Pittsburg, Fort Wayne and Chicago Railway Company, under the authority of an ordinance of the city of Chicago, constructed its tracks on Beach street. The tracks so constructed were also used by the Chicago and Alton Railroad Company, and, as appears from the record, were the main tracks running to the passenger depot of the two companies. Soon after these tracks were laid, a switch was built on Beach street, which connected the tracks of the Fort Wayne company with tracks owned by Beeves upon his lots, by means of which, cars passing over the Fort Wayne *42and Alton roads were switched upon Beeves’ premises, which were used by him as a coal and lumber yard. In 1875 Beeves died, leaving Sarah A. Beño and Eugenia M. Little two of his heirs, who purchased the interest of the other heirs in said premises. After they acquired title, their husbands, under the firm name of Beño & Little, occupied a portion of the lots as a coal yard. On the 38th day of July, 1880, Mrs. Beño and Little sold the Pittsburg, Fort Wayne and Chicago Railway Company lots 33 to 40, inclusive, in block 63, for the sum of $35,000, being' one hundred feet each side of lots 36 to 46. The contract of sale was reduced to writing, and contained the following clause: “And it is further so agreed between the parties hereto, that said second party shall, on taking possession of the premises as hereinbefore described, restore all the switch connections now existing between said second party and said first party, or any of them, and continue to them the use of the same, hereafter as heretofore. ” On the 33d day of November, 1880, a deed wras made, at the request of the Fort Wayne company, to James D. Layng, its general manager. The deed executed was a general warranty deed, and conveyed the premises without any reservation whatever, or without any reference to that clause of the contract in regard to switch connections. Layng, by his deed dated December 39, 1880, conveyed to the Fort Wayne company an undivided one-half of the east sixteen feet of the premises, and by deed.of the same date conveyed the other undivided half of the last named premises to the Chicago and Alton Bailroad Company, and by deed of the same date, for a consideration of $38,761.40, he conveyed to the Chicago, Burlington and Quincy Bailroad Company the remaining portion of said premises. The Fort Wayne and Alton companies, after taking possession of the premises conveyed to them, restored the switch connections, as provided in the contract of sale; but the Burlington road, upon entering into possession of the premises conveyed to it by *43Layng, removed the switch connections and tracks which crossed the premises conveyed to it, and constructed upon said premises seven tracks, which it has used and operated ever since. After the Burlington road had removed the tracks which formed the switch connections, the Alton and Fort Wayne roads were requested to restore the switch connections, as provided in the written contract of sale, but the railroad companies declined to comply with this request, and Sarah A. Reno, and her husband, Charles A. Reno, Eugenia M. Little, and Jacob H. Little, her husband, filed a bill for a specific performance of that part of the contract of sale providing for a switch connection over the premises. On the hearing in the Superior Court, a decree was rendered as prayed for in the bill. This decree was affirmed in the Appellate Court, and an appeal has been prosecuted here to reverse the judgment of the Appellate Court.
Much of the argument has been devoted to a discussion of the question whether the Burlington road is bound or concluded by the contract of sale under which the Fort Wayne railroad company purchased the premises. We shall not, however, stop to discuss or pass upon that question, as the decision of the case must be placed upon other grounds. The bill is brought to enforce the specific performance of a contract, and the case made under the bill must be governed by the law as it has been settled by the courts in that class of cases.
The principle which should govern where a bill is brought to enforce the specific performance of a contract, is not a new one in this court. On the other hand, this court has, in a number of eases, discussed the question, and determined the law which should, as a general rule, control in such eases. This court has often decided that a bill for specific performance of a contract is addressed to the sound legal discretion of the court, and relief will not be granted as a matter of course, although a legal contract may be shown to exist. *44In Lear v. Chouteau, 23 Ill. 39, it was held that in order to induce a court of equity to enforce, specifically, a contract, it must be founded on a good consideration,—it must be reasonable, fair and just. In Iglehart v. Vail, 73 Ill. 63, it was held that it was not every contract that will be specifically enforced. Especially if there is anything that makes it inequitable, courts will hesitate to do so. In McCabe v. Crosier, 69 Ill. 501, it was held to be the settled doctrine of this court, as of most other courts of equitable cognizance, that a party can not call of right upon a court of equity to exercise that branch of its jurisdiction,—that its exercise rests in the sound discretion of the court, in view of the terms of the contract of the parties, and the surrounding circumstances. To the same effect is Bowman v. Cunningham, 78 Ill. 48. In Chicago and Alton Railroad Co. v. Schoeneman, 90 Ill. 258, which was a bill brought by certain parties to compel the railroad company to construct and maintain a certain swing draw-bridge, in conformity with an agreement in that regard, it was declared to be a settled principle that a specific performance of a contract is not to be decreed as a matter of course because a legal contract is shown to exist, but it rests entirely in the discretion of the court, upon a view of all the circumstances of the case. In the same case it was also held: “Where the effect of the specific performance would be to impose upon the defendants a large expenditure and heavy burden, and inconvenience to public interests, without any practical benefit to the other-party, a court of equity, in the exercise of its discretion, will refuse to decree it, and leave such other party to whatever remedy he may have at law for a breach of the contract. ” See, also, Fish v. Leser, 69 Ill. 394; Matlock v. Butler, 10 Ves. 292; Welton v. Welton, 16 id. 83; Willard v. Taylor, 8 Wall. 557. In the last case cited, the court held that no positive rule could be laid .down by which the action of the court can be determined in all cases, and said: “In general it may be said, that the specific relief will be granted where it *45is apparent, from a view of all the circumstances of the particular case, that it will subserve the ends of justice, and that it will be withheld when, from a like view, it appears that it will produce hardship or injustice to either of the parties. ”
Other authorities illustrating the doctrine might be cited, but it will not be necessary to do" so. Enough have been cited to show the law on the subject, and it will only be necessary now to inquire briefly as to the facts and circumstances surrounding the transaction, to determine whether the decree granting the relief prayed for in the bill is in harmony with the law.
The passenger and freight depots of the Burlington road are located three blocks north of the premises owned by appellees, and the seven tracks constructed by the Burlington road on the premises conveyed by Layng to it, are the only tracks owned by the company where its freight and passenger-trains can be made up. The Burlington road has invested in freight and passenger depots about $1,500,000. Thomas L. Potter, general manager, whose evidence is not contradicted, testified that the passenger tracks are used continually all times of the day. Trains are arriving and departing all the time, and every train that comes in has to be made up on those tracks. He also testified that two hundred freight trains a day pass over the tracks, in and out. In answer to a question as to.the effect the construction of switches across the tracks would have upon the business of the road, he testified that it would ruin the tracks.for business. Indeed, it appears from the evidence that it would be impracticable to operate the proposed switches over the Burlington tracks, on account of the constant use that is made of these tracks by the Burlington- road. It seems plain from the evidence, that the construction of the proposed switches across the tracks of the Burlington road would seriously embarrass its operation at that point. The effect could not be otherwise than to delay trains carrying both passengers and freight, and endanger their safety. The carrying of the mails would be retarded, *46and, indeed, the commercial business of the country would, to a great extent, be disturbed. These are matters in which the public, as well as the Burlington road, have an interest, and we are satisfied, from the evidence, that if the decree should be sustained the public business of the country would be seriously damaged.
Under such circumstances, and where such results are to follow, would it be proper for a court of equity to decree a specific performance of the contract ? The decree would impose upon the Burlington road a large expenditure of money and a heavy burden, and would be a detriment to the public interest, and it is condemned under the ruling in the Schoeneman case, supra. The decree would also produce hardship and injustice to one of the parties, and can not be sustained under the ruling in Willard v. Taylor, supra. Nor will the denial of relief in equity operate detrimental to the rights of appellees. If they have been damaged by a breach of the contract, they have an ample remedy at law, in an appropriate action. Nor will the denial of the relief prayed for in the bill destroy the business of appellees, or destroy the use of the property as a coal yard. The record shows that the Burlington road has laid tracks immediately adjoining, appellees’ property, which tracks are used by the company, and connect with its main line, and the main line connects with all the roads leading into the city. Section' 5, article 13, of our constitution, requires that “all railroad companies shall permit connections to be made with their track, so that any such consignee, and any public warehouse, coal bank or coal yard, may be reached by the cars on said railroad.” Under this provision, appellees’ property, as a coal yard, may, if they so desire', have switch connection with the Burlington road, and being so connected, they will also have connection with all other roads in the city. Indeed, in the answer the Burlington road sets up that its tracks connect with the Fort Wayne and Alton roads, and all other lines in the city, and offers to connect its line of road with the premises of appellees.
*47After a careful consideration of all the evidence in the record, we are satisfied that the decree of the Superior Court is not right. The judgment of the Appellate Court will therefore be reversed, and the cause remanded.
Judgment reversed.
Scholfield, Ch. J., and Mulkey, J., dissenting.
Mr. Justice Dickey : I do not hold that complainants are not entitled to any relief. I think they ought to have a decree compelling the restoration of the tracks, unless the Chicago, Burlington and Quincy Railroad Company shall at once proceed to condemn their rights under the contract. The right of complainants to the easement in the land granted is property. The Chicago, Burlington and Quincy Railroad Company ought not to be allowed to take from complainants that right, without compensation. In case that company shall proceed, without delay, to have these rights condemned, no specific performance should be decreed. Reasonable time should be given for that purpose. Should that company fail to thus acquire the exclusive right o'f way, then I think complainants ought to have a decree for specific performance.