delivered the opinion of the court:
This is an action of ejectment, brought by the appellee, William E. Borders, in the circuit court of Eandolph county, against the appellant, the Illinois Southern Bail-way Company, for the possession of a tract of land in said county occupied by the defendant as a right of way for its railroad. A declaration in the usual form was filed, and defendant pleaded not guilty, and a special plea relying upon a license by the former owners of the land, and a written contract by said owners to convey said right of way to the Centralia and Chester Eailroad Company upon the completion of its railroad, together with averments that said Centralia and Chester Eailroad Company performed said contract on its part, and that defendant took possession as successor in title and grantee of said railroad company. There was a general, replication, and the jury having been waived, there was a trial by the court, resulting in a finding for the plaintiff. Both parties claimed title to the premises in controversy from a common source.
The following facts were proved at the trial: Peter A. Menard had been the owner and in possession of certain tracts of land, including-the strip in controversy, and on November 9, 1894, a contract was entered into between him and George D. Seymour, Edward Staub and the plaintiff,, William E. Borders, which recited, in substance, that Seymour and Staub had paid for the account of Menard certain sums of money and had received a *462master’s deed for said lands, and contained agreements that plaintiff should pay Seymour and Staub, that Menard should have until October 11, 1895, to re-pay the moneys advanced, and that on such re-payment the lands should be conveyed to him. This contract was never recorded, and Menard remained in possession of the lands. The Centralia and Chester Railroad Company surveyed and located its railroad over the land on the right of way in question in the summer of 1895. On September 19; 1895, said Peter A. Menard, George D. Seymour and Edward Staub executed a contract to the Centralia and Chester Railroad- Company, agreeing to execute and deliver a deed of said right of way to said company on the completion of its railroad to Chester, Illinois. This agreement was not recorded until June 24, 1901, when it was filed for record. Seymour and Staub executed a quitclaim deed of the lands to the plaintiff, which was dated ^ October 21,1895, acknowledged October 24,1895, and filed for record November 8, 1895. An endorsément was made on the’ contract by Borders, Seymour, Staub and Menard, dated October 28, 1895, certifying that all matters referred to in the contract had been settled and adjusted and the contract satisfied. They had sold some of the land and plaintiff had paid the balance of the indebtedness, and he gave Menard an agreement to convey the lands to him on payment of the balance due. On February 18, 1898, Menard filed his bill against plaintiff to redeem the lands, alleging" that the quit-claim deed made through Seymour and Staub to plaintiff was executed as a mortgage to secure the debt of Menard. Plaintiff filed a cross-bill in the cause, and upon a hearing the court found that the deed was in fact a mortg'age, ascertained the amount due to plaintiff, and decreed that Menard should have the right of redemption on or before February 1, 1899, and on default of payment the legal title, as against Menard, should vest absolutely in the plaintiff. Menard did not redeem and the title became absolute under the « *463decree. The agreement under which the right of way was to be conveyed was fully performed by the Centralia and Chester Railroad Company, and in the year 1900 title to all property of said company, including the right of way in question, passed to the defendant throug'h a deed of the master in chancery of the United States court and subsequent conveyances. On June 19, 1901, Peter A. Menard, George D. Seymour and Edward Staub madq a conveyance of the strip in controversy to the defendant, in pursuance of the terms of said agreement.
Possession by a railroad company of its right of way is notice to all subsequent purchasers of its rights in the premises. (Chicago, Burlington and Quincy Railroad Co. v. Boyd, 118 Ill. 73; Chicago and Eastern Illinois Railroad Co. v. Hay, 119 id. 493.) The only matter of fact in controversy at the trial was whether defendant had such possession, under the contract for the conveyance to it, as would operate as a notice to plaintiff of its rights when he took his conveyance. The contract under which he received the quit-claim deed was never recorded, and Menard remained in possession while the legal title was in Seymour and Staub. There was nothing to give notice of any interest in the lands in the plaintiff until his quitclaim deed was recorded, on November 8,1895. It is quite clear from the evidence that the railroad company was in open and visible possession of the right of way before that time and before the conveyance was made to plaintiff. The mere preliminary survey and driving of stakes in the summer of 1895 would not operate as notice, but a location was afterward in fact made, and an engineering party went upon the land in September, 1895, for the purpose of cross-sectioning, and set the side stakes for the work and established and marked the grades. On the east side of the right of way there was a high bluff and on the west side the Mississippi river. The right of way in places was in this road and at other places was at varying distances from it. There was some under*464brush, which was cleared away, and teams and men were brought on the premises and plowing and grading were begun on September 14, 1895. There was no heavy grading, but there were light cuts and fills across the land, and it would not be possible for any person to go upon the premises or travel along the road without seeing that there was a railroad grade there and that the railroad company was in possession. The possession was open, visible and manifest to every one. There was about four hundred feet of bridge work which was not constructed at that time, but it could plainly be seen that" the railroad was in process of construction, and the bridge work was done afterward. The grade and road-bed were completed and ready for the ties a good while before the ties and track were laid, but the right of way never was abandoned and the track was finally completed in 1897. The first train was run to Chester on December 20 of that year. There was a witness who ran a landing on the Mississippi river north of the Menard land who testified that no work of construction was done in 1895 and that it was done in 1896, but his recollection must have been at fault. His testimony was clearly overcome by that of a number of credible witnesses, supported by books showing dates when the work was done, against which there is no ground of suspicion.
The principal claim of defendant see.ms to have been that the agreement to convey the right of way was a mere license, revocable at will, and that it was revoked by the quit-claim deed of Seymour and Staub to plaintiff. We do not regard that position as sound, but consider the agreement a binding contract when acted upon by the railroad company. The company expended its money on the faith of the contract and completed and jiut in operation its railroad, and was entitled to enforce the agreement according to its terms. (Telford v. Chicago, Paducah and Memphis Railroad Co. 172 Ill. 559.) The agreement was made by the holders of the legal title and the party in *465possession having an equitable interest and without notice of any right or title in the plaintiff. The entry of defendant’s predecessor in title was with the consent of the owners and lawful in its inception, and the possession did not become wrongful as against plaintiff. He could not maintain ejectment. Turpin v. Baltimore, Ohio and Chicago Railroad Co. 105 Ill. 11; Hall v. Peoria and Eastern Railway Co. 143 id. 163.
We conclude that the finding and judgment of the circuit court were not justified by the evidence. The judgment is reversed and the cause remanded.
Reversed and remanded.