Demurrers were sustained to each of the three paragraphs of appellant’s complaint, and the correctness of such action is the question for decision.
A written contract, executed by the Louisville, New Albany & Chicago Eailway Company, as the party of the first part, and by the Evansville & Eichmond Eailway Company, as party of the second part, is filed with each paragraph and forms the basis for the relief prayed, which in the first and second paragraphs is specific performance of the contract, and in the third, judgment for the reasonable cost of constructing the interlocking switch specified therein. The averments are made that appellant succeeded to the rights of the Louisville, New Albany & Chicago Eailway Company, and that appellee holds the title of the *236Evansville & Richmond Railway Company, and that the one has the right to enforce, and the other is hound hy, the contract in question. This is not controverted, so that the rights of the parties will not he different from what they would be had the agreement between them been originally, and the terms “first party” and “second party,” when used in this opinion, will be used as applicable to appellant and appellee respectively.
The contract made on July 29, 1889, in terms grants to the second party the right to construct and operate its railroad over and across the main track and switches owned by the first party, at a designated distance north of the Bedford telegraph office, upon certain specified conditions, which the .second party bound itself to perform. The substance of these conditions was that the second party should furnish all material and perform all labor necessary to raise a certain switch track belonging to the first party, to furnish all material and perform all labor incident to the construction and maintenance of the crossing, including an interlocking switch and signal system. In event that the first party should thereafter wish to construct additional tracks, it agreed to adopt its own tracks thereto and pay one-half of the expense of whatever else (frogs, signals, etc.) might be necessary to make the crossing safe. It was further stipulated that proper appliances were to be used in such improvement, and that employes performing service at said crossing should be subject to removal at the demand of the first party. The second party bound itself- to hold the first party harmless from cost and damage resulting from the construction or the use of said crossing. The concluding clausés of the contract were of the tenor following :
“Sixth. The second party agrees not to run any track or tracks to or from any stone-quarry which is connected with the road of the first party, by switches or tracks built thereto by said first party or under contract therefor, and will not make any demands for *237the use of said first party’s tracks or switches leading to any such quarries, for the shipment of stone therefrom, the express purpose of this clause being to preserve to said first party all rights and benefits now acquired in the business of such quarries; and it is hereby expressly understood and agreed that the consideration for granting the rights and privileges herein expressed to said second party is the covenant and agreement of said second party not in any manner, directly or indirectly, to interfere with or divert the benefits now derived or to be hereafter derived from said first party’s connection and business with such quarries.
Seventh. In consideration of making a Y connection, it is agreed between the parties hereto that in case any party or parties require said first party to forward stone or other car-load freight to the line of the second company, it is agreed that the proportion of the through rate from any given quarry or station accruing to the party of the first part shall not be less than three cents per hundred pounds.”
By clause sixth the second party agreed not to run any track into any stone-quarry connected by switches or tracks with the road of the first party, and not to demand the use of such tracks for the shipment of stone; “the express purpose of this clause being to preserve to said first party all rights and benefits now acquired in the business of such quarries.” The concluding portion of the clause contains a further agreement by the second party not “directly or indirectly to interfere with or divert the benefits now derived or to be hereafter derived from said first party’s connection and business with such quarries.” This clause clearly states the purpose for which it is drawn. Its effect, and its intended effect, is to deprive a class of citizens, engaged in a certain business, of advantages that might accrue to them from the facilities afforded them for the shipment of their merchandise over a competing railroad.
*2381. *237By this agreement the two railroad companies undertook to contract away the rights of third parties, without their *238knowledge, and in defiance of the public duty devolved upon such companies. That tbe contracting parties were conscious of tbe quality of such undertaking is indicated by tbe seventh clause of the contract, where, in case “any party or parties require said first party to forward stone * * * to the line of the second party,” then irrespective of distance, at least three cents per hundred pounds must be paid first party for its share of the through rate; a stipulation, the effect of which is to deprive the shipper of the benefits of competition, should he demand that the second party discharge its public duty by furnishing transportation facilities to him. The policy of the law is to prevent the- creation of monopolies and to foster fair competition. Eel River R. Co. v. State, ex rel. (1900), 155 Ind. 433; Indianapolis Union R. Co. v. Dohn (1899), 153 Ind. 10, 45 L. R. A. 427, 74 Am. St. 274; State, ex rel., v. Portland Nat. Gas Co. (1899), 153 Ind. 483, 53 L. R. A. 413, 74 Am. St. 314; Board, etc., v. LaFayette, etc., R. Co. (1875), 50 Ind. 85; 2 Elliott, Railroads, §359.
2. “A contract between corporations charged with a public duty,- such as that of common carriers, providing for the formation of a combination having no other purpose than that of stilling competition, and providing means to accomplish that object, is illegal. The purpose to break down competition poisons the whole contract, and there is here no antidote which will rescue it from legal death.” Cleveland, etc., R. Co. v. Closser (1890), 126 Ind. 348, 361, 9 L. R. A. 754, 22 Am. St. 593. The important thing to be secured was, the court declared in the case above cited, a sound and salutary general principle, and not merely cases with closely resembling facts. The principle declared, as heretofore quoted, accords with the necessities of commerce and development, and is supported by a vast volume of authority, including the following: Louisville, etc., R. Co. v. Sumner (1886), *239106 Ind. 55, 59, 55 Am. Rep. 719; St. Louis, etc., R. Co. v. Mathers (1874), 71 Ill. 592, 22 Am. Rep. 122; Greenhood, Public Policy, p. 626; Kettle River R. Co. v. Eastern R. Co. (1889), 41 Minn. 461, 43 N. W. 469, 6 L. R. A. 111; West Va. Trans. Co. v. Ohio River, etc., Co. (1883), 22 W. Va. 600, 626, 46 Am. Rep. 527.
3. It is contended in argument that it was competent to make the contract in question, in order to prevent destructive competition. There is no basis of fact justifying the proposition. A combination between common carries to prevent competition is prima facie illegal. “The burden is on the carrier to remove the presumption, and until it is removed the agreement goes down before the presumption, and the agreement must be held to be within the condemnation directed against all contracts which violate public policy.” Cleveland, etc., R. v. Closser, supra, at page 360. And see State, ex rel., v. Portland Nat. Cas Co., supra.
4. The appellee railroad company has power, by the provisions of the statute, to purchase, receive and take such lands as may be necessary to the construction and maintenance of its railroad, stations, depots and other accommodations necessary to accomplish the objects for which the corporation was created. §5153 Burns 1901, §3903 R. S. 1881. The statute also makes it the duty of railroad corporations to furnish sufficient accommodations for the transportation of all such persons and property as shall, within a reasonable time previously thereto, offer or be offered for transportation at the place of starting, at the junctions of other railroads and at sidings and stopping places established for receiving way pas-, sengers and freight. §5185 Burns 1901, §3925 R. S. 1881. It has frequently been adjudged that contracts of a railroad company, by which it undertakes not to locate stations or depots within prescribed limits, are contrary to public policy and void. Louisville, etc., R. Co. v. Sumner, *240supra; St. Joseph, etc., R. Co. v. Ryan (1873), 11 Kan. 602, 15 Am. Rep. 357; Florida, etc., R. Co. v. State, ex rel. (1893), 31 Fla. 482, 13 South. 103, 34 Am. St. 30, 20 L. R. A. 419; Elkhart County Lodge v. Crary (1884), 98 Ind. 238, 49 Am. Rep. 746. The analogy between an agreement not to furnish facilities for transportation by the location of depots, and an agreement not to furnish facilities for transportation by the location of certain side-tracks, is exact.
No question of the exercise of the right of eminent domain is involved in this appeal. It is not even shown that it would be necessary to condemn or purchase any land in order to reach the stone-quarries that are presumably within reach of appellee’s railroad. So far as facts are shown, its right of way may abut upon any number of quarries, in the output of which not only the owners but the purchasing public are interested, both as to price and delivery. If sidings were in existence connecting appellee’s railroad with such quarries, it would be bound to receive and transport freight there offered to it. To disable itself, by contract with a competing carrier, from constructing such siding, is something it cannot be allowed to do. The sidin'g is as essential to the proprietor of the stone-quarry, in the transportation of his commodity, as the station or depot is to him who wishes to take passage himself or to ship lighter merchandise. The agreement made by the second party to this contract, as specified in clause six, is within the reason of the law and the authorities. It is therefore illegal.
5. Appellant, however, contends that, even if the contract be declared ultra vires, the second party to it, having acquired the right to crpss its tracks, and having crossed them, will be required to make compensation upon the established principle that a corporation may not retain the benefit received under an ultra vires contract and at the same time set up its own want of power *241to contract; The difficulty with the application of this doctrine is that the undertaking is not ultra vires in the strict sense, hut it is illegal and absolutely void; “The doctrine does not apply to contracts where the same are forbidden by statute or are contrary to public policy.” Franklin Nat. Bank v. Whitehead (1898), 149 Ind. 560, 39 L. R. A. 725, 63 Am. St. 302.
6. “If a promise to do several acts is indivisible, and is in part illegal, it cannot be enforced as to that part which is legal, but the whole agreement is void. * * * Where the agreement consists of one promise made upon several considerations, some of which are bad and some good, here, also, the promise is wholly void, for it is impossible to say whether the legal or the illegal portion of the consideration most affected the mind of the promisor, and induced his promise.” Clark, Contracts, p. 472.
Where an action was brought upon a note, part of the consideration of which was an agreement that the makers should have the exclusive right to carry policies of marriage benefit insurance upon the payee and his intended, the contract was held to be entire and unenforceable. James v. Jellison (1884), 94 Ind. 292, 48 Am. Rep. 151. The authorities sustaining the propositions stated are too numerous to require citation. The doctrine is as thoroughly settled and its principle is as wholesome as any known to the law. Higham v. Harris (1886), 108 Ind. 246; Ricketts v. Harvey (1886), 106 Ind. 564; Rainbolt v. East (1877), 56 Ind. 538; Douthart v. Congdon (1902), 197 Ill. 349, 64 N. E. 348; Bishop, Contracts (2d ed.), §487.
In Hunter v. Pfeiffer (1886), 108 Ind. 197, an agreement was made by a number of parties to enter into a partnership in the construction of a public work. The plaintiff based his right to recover upon a breach of such contract of partnership. The action was apparently in*242offensive, but facts were stated in the pleadings -from which the court inferred that one of the reasons for making the partnership contract was a desire to prevent competition in bidding upon the public work. Recovery was refused. The opinion, written by Judge Mitchell, is most direct. It is said therein: “The whole purpose of the statute is to encourage open, fair competition between responsible bidders, and any secret combination, call it partnership or anything else, the effect of which is to abate honest rivalry or prevent fair competition, is to be condemned as violative of public policy, and void. No one can predicate an enforceable right upon such an agreement.”
7. The appellant is seeking to enforce a contract illegal in itself. The law will refuse to lend its aid to that end. Executory, it will interfere at the suit of neither party; executed in whole or in part, it leaves the parties where they have placed themselves. Terre Haute Brewing Co. v. Hartman (1898), 19 Ind. App. 596; Woodford v. Hamilton (1894:), 139 Ind. 481; Hutchins v. Weldin (1888), 114: Ind. 80; Schmueckle v. Waters (1890), 125 Ind. 265.
It makes no difference that the whole consideration was not in itself illegal. In Kain v. Bare (1892), 4 Ind. App. 440, the note in suit had been given for Bohemian oats, and the contract calling for the sale of other oats was held to be a gambling contract, and therefore illegal as against public policy. This court then said: “The fact that the answer concedes the oats to have been of some value is used as an argument by appellant’s counsel in favor of the position that the consideration not being wholly illegal, the answer is but a partial response to the complaint when it attempts to meet all, and is therefore bad. If the answer sought to avoid the contract on account of fraud, the appellant’s position would be sound, as this court has decided. Regensburg v. Notestine [1891], 2 Ind. App. 97. But where the entire contract is illegal and void, from public *243policy, the courts will not lend themselves to the enforcement of any part of it. Schmueckle v. Waters [1890], 125 Ind. 265.”
If the action were brought by the appellee under the contract to enforce its right to the crossing, questions involved would be presented exactly as in an action on a promissory note given in consideration of two agreements, one legal and one illegal, as in James v. Jellison, supra. Mo one could then say that the consideration for the contract, enforcement of which is asked, was not tainted, and no one could tell what part of the engagement depended upon the illegal part thereof.
In Edwards County v. Jennings (1896), 89 Tex. 618, 35 S. W. 1053, the commissioners of a county granted an exclusive right to lay pipe, etc., in the streets of a town, and agreed to pay $3,500 in consideration of the erection of a water-works system in said town. The grant of an exclusive franchise was, under the laws of the state, illegal. The court refused to separate the parts of the consideration, saying that it was impossible to determine how much of the contractor’s obligation was based upon the illegal part of the consideration.
8. Does the fact that the crossing has heen made, and that the action is to recover that part of the consideration, not in itself illegal, render the contract divisible and enforceable? The answer, upon principle, is that neither divisibility nor illegality depends upon the form of the action, or which party happens to be plaintiff. The question, however, is settled by the authorities.
In Indiana, etc., R. Co. v. Koons (1886), 105 Ind. 507, a written contract was considered by which Koons conveyed to the railroad a right of way over his land, it agreeing in return to fence the right of way and also to build certain cattle-guards. The action was brought to recover the reasonable cost of the fences, which, it was averred, the company had failed to build. The defense was that in a prior *244action Noons had recovered judgment for $40 on account of the failure of the company to build cattle-guards. The Supreme Court held that the contract was entire and indivisible, and that, notwithstanding no recovery had been sought or had in the prior action, on account of the failure to fence, there could be none in a latter one, in the absence of stipulations making the dates of performance separate and different. Indiana, etc., R. Co. v. Koons, supra. The contract considered by the court in that case, the conclusion stated, and the reason therefor, render the case an authority in this one, and compel the conclusion that the contract now under consideration is an entire contract. Being entire for one purpose, it is entire for all purposes.
When a mortgage secures two notes, one valid and one illegal, or a bill of goods consists of various items, a specific price being fixed to each item, and in other similar cases, a different rule applies; but in the case at bar it must be held in the language of Judge Elliott: “If the promissory notes which constituted the cause of action upon which the plaintiff must recover, or not recover at all, were founded on an illegal consideration, then, no matter what the court may have instructed upon the subject of an executed consideration, the verdict is right. The defense which the answers to the interrogatories reveal renders a recovery by the plaintiff'legally impossible. It cuts up his cause of action Toot and branch.’ * * * The first instruction asked by appellant was properly refused. If the consideration of a promissory note is in part illegal and in part legal, and is indivisible, there can be no recovery upon the note.” Ricketts v. Harvey (1886), 106 Ind. 564.
9. The present action is one in which it is not only appropriate for the court to consider the contract made by these parties, but the duty of the court to the public, against whom the contract in question is directed, calls upon it to do so.
*245That duty cannot he put aside until appellant comes into court asking that the illegal clause he enforced. The presumption is that it will not need ever to do this. It cannot he deferred until some quarry man or citizen institutes a proceeding to declare its invalidity. The fallacy of such an idea can in noway be so clearly exposed as by an illustration, extreme in terms, but equivalent in principle. Preliminary to the illustration, it may be recalled that this court has declared: “ Tt is now settled here, that contracts which are void at common law, because they are against public policy, like contracts which are prohibited by statute, are illegal as well as void. They are prohibited by law because they are considered vicious, and it is not necessary to impose a penalty in order to render them illegal.’ ” Nave v. Wilson (1895), 12 Ind. App. 38.
If, in consideration of property conveyed or delivered, one should contract to pay money and commit crime— larceny, burglary or robbery- — would any enlightened conscience entertain the idea that the vendor could recover the money consideration in court and that the illegality of the undertaking could only be set up when the crime was being consummated, and then by the unsuspecting victim? If it were to be assumed that the contract in question contains no express stipulation preventing the separation of the valid from the illegal portion of the consideration, the principle stated by the authority heretofore cited would forbid the courts from making such division.
10. The stipulations of the written contract make it impossible in any view that might be taken. It is premised that the consideration of a written contract may be made contractual, and that it can then no more be varied than any other portion of the instrument. Pennsylvania Co. v. Dolan (1893), 6 Ind. App. 109, 51 Am. St. 289; Stewart v. Chicago, etc., R. Co. (1895), 141 Ind. 55.
*24611. *245The intention of the parties controls. “Where the inten*246tion clearly appears from the words used, there is no need to go further, for in such a case the words must govern; or, as it is sometimes said, where there is no doubt, there is no room for construction.” Clark, Contracts, p. 590.
The intention is so potent that, where it appears that the parties intended the contract to be an entire one, such intention will control, and prevent its being considered as divisible, although it might so be regarded in the absence of the contrary intention. 7 Am. and Eng. Ency. Law (2d ed.), 95; Wooten v. Walters (1892), 110 N. C. 251, 14 S. E. 734; Loud v. Pomona Land, etc., Co. (1894), 153 U. S. 564, 14 Sup. Ct. 928, 38 L. Ed. 822; Southwell v. Beezley (1875), 5 Ore. 458.
12. The contract under examination precludes the court from treating it as a divisible one. The parties deliberately carry and put the illegality into every portion thereof. The language used is: “It is expressly understood and agreed that the consideration for granting the rights and privileges herein expressed to said second party, is the covenant and agreement of said second party not in any- manner, directly or indirectly, to interfere with,” etc. They thus say that the right to cross appellee’s track was given in consideration of its undertaking not to compete with it for freight. What court will dispute them? Who will, in the face of this deliberately made agreement, say that the consideration for the right to cross was anything else ? Reagan v. First Nat. Bank (1902), 157 Ind. 623. It is but just to appellant’s attorneys, who have argued this case with distinguished ability, to say that they have not suggested such action.
Probably an interlocker and signal system ought to be constructed at this .crossing. But that is not a question in this case. This leads to an affirmance of the judgment, and it is so ordered.
Henley, O. J., Oomstoek and Robinson, JJ., concur. Wiley, P. J., and Black, J., dissent.