By the Court:
The plaintiff brought this suit in ejectment for a strip of land used by' the defendant railway company as a right of way for the purposes of its railroad, and at the trial obtained judgment for the recovery of the land, and a certain sum for mesne profits.
*507The agreed. and admitted facts are, in substance, as follows: The strip of land in question forms a part of the E.| of the S. W. and the W. of the S. E -j- of sec.. 2, T. 10, S. of R. 5 East, Salt Lake Meridian. These government subdivisions constituted the respondent’s preemption or homestead claim, being the same lands for which he received a patent from the United States. They were unsurveyed lands until December 11, 1884, when, with other adjoining tracts, they were surveyed, and the-survey approved March 12, 1885, and filed in the Utah land office, June 30, 1885. The plaintiff, in “November,. 1877, bought certain improvements made by parties who-had occupied the lands in summer for dairy purposes,” and, about May 1, 1878, moved, with his family, on to the quarter section, of which the strip of land in dispute forms a part with intent to pre-empt the same and acquire title thereto when surveyed, and, except as to the land in dispute, has occupied the same ever since, and, after it was surveyed, filed, on August 7, 1885, his preemption claim. The United States patent therefor was. issued to him on July 3,1890, and it contains no exception of a right of way for a railroad, or of railroad rights.
The Utah & Pleasant Valley Railway Company, of which defendant company is a successor, was duly or-ganised on December 11, 1875, and its articles of incorporation properly filed on the same day. The termini of' its authorized line of route were Provo and Pleasant Valley, its line extending a distance of fifty miles, and over the disputed premises. In 1876, that company made a preliminary survey of its line from Springville to and over the demanded strip, and marked the line with numbered stakes at the angles, but the curves were not put in or marked on the ground. In 1877, and before November, the survey and location were completed from Spring-*508ville to, over and beyond the strip in question, the curves were put in, the cuts and fills marked, brush cut wherever it appeared on the line, and grading was done on the line irom Springville toward the mouth of Spanish Fork canyon. In 1878, the location of the remainder of the line was completed, and the grading finished from Springville to the land in dispute, and in 1879, the raidroad was completed from Springville to Pleasant Valley, a distance of forty-six miles. The railway company, under the act of congress of March 3, 1875, filed with the secretary of the interior its articles of incorporation and proofs of its organization, and they were approved March 20, 1879. A map and profile of the line of route over the strip in question were approved by the secretary of the interior December 22, 1881. The title was traced from the Utah & Pleasant Valley Railway Company, through foreclosure proceedings, to one Spackman, from him to the Denver & Rio Grande Western Railway Company, and from it to the appellant, it having obtained it in June, 1889. The demanded premises were fenced, and, since 1879, have been continuously occupied as a right of way, for a railroad operated thereon, by the appellant and its predecessors in title. Both parties have paid taxes, the respondent on the quarter section, the appellant and its predecessors on the line of railroad.
This appeal is from the' judgment.
Bartch, J.,
after stating the case as above, delivered the opinion of the court.
The appellant contends that in fact, as well as by legal relation, it was the first occupant of the strip of land in controversy; that the strip was appropriated as a right of way for its railroad under the act of congress of July 3, 1875; and that it acquired title to at least an easement *509therein before the respondent obtained any interest in the 'land.
In the first section of the act of congress mentioned (18 U. S. Stat. at Large, p. 482) it is provided: “That the right of way through the public lands of the United States is hereby granted to any railroad company duly organized under the laws of any state or territory, * * * which shall have filed with the secretary of the interior a copy of its articles of incorporation, and due proofs of its organization under the same, to the extent of one hundred feet on each side of the central line of said road.”
This is an express provision for the granting of rights of way to railroad corporations, over the public lands of the United States. The terms imposed upon any railroad company, to secure the benefits of the act, are that such company must have been duly organized under the laws of a state or territory, and that its articles of. incorporation, and due proofs of its organization thereunder, have been filed with the secretary of the interior. In the case at bar, it is admitted that the Utah & Pleasant Valley Railway Company, predecessor of the appellant, was duly organized under the laws of the territory of Utah, on December 11, 1875; that under the act of congress, referred to, it filed a copy of its articles of incorporation and due proofs of its organization under the same; and that the same were approved by the secretary of the interior on the 20th of March, 1879.
The railroad company was thus admittedly in position to avail itself of the benefits of the act, and this it could do in manner specified in section 4 of the same act, which reads:
“That any railroad company desiring to secure the benefits of this act, shall, within twelve months after the *510location of any section of twenty miles of its road, if the same be upon surveyed lands, and, if upon unsurveyed lands, within twelve months after the survey thereof by the United States, file with the register of the land office for the district where such land is located a profile of its >road; and upon approval thereof by the secretary of the .interior, the same shall be noted upon the plats in said -office; and thereafter all such lands over which such right of way shall pass, shall be disposed of subject to -such right of way: Provided, That if any section of said road shall not be completed within five years after the location of said section, the rights herein granted shall be forfeited, as to any such uncompleted section of said road.’’
Under the provisions of this section, it is clear that a railroad company, in order to secure the benefits of the -act, must locate its line of road, and it therefore necessarily follows that it has the right to enter upon the public domain for that purpose, and that in so doing it is not a trespasser, but is simply availing itself of a privilege granted by the law. Then, after the location of its road, it must file a profile thereof with the register of the land office, as provided in the section, and, upon approval of the profile by the secretary of the interior, the same shall be noted upon the plats of the land office, and thereafter the land over which the right of way is located shall be disposed of subject to such right of way.
Referring again to the admitted facts, it will be seen that the railway company commenced the survey for its line of road in 1876, surveying a preliminary line over the land in question. Before November in 1877, the location of the road was completed over and beyond the demanded premises, and brush cut wherever it grew on the line. Tn 1878, grading was done, and in 1879 the road *511was completed to and over the strip of land in controversy, and the road has been operated ever since. A map and profile of a section of twenty miles of its railroad was also filed, under the act of congress, with the secretary of the interior, and while it does not appear from the admitted facts that the same were also filed with the register of the Utah land office, still it does appear that they "were duly approved by the secretary of the interior, and, upon such approval, it became the duty of the proper officials to make the proper notations on the plat books in the land office. The approval of the map and plats by the secretary of the interior had the effect of perfecting the grant of the right of way to the railroad company, and, by relation the grant took effect as of the date of the location of the road over the land. Kinien v. The K. C., Ft. S. & M. Ry. Co., 118 Mo. 577; Railroad Co. v. Alling, 99 U. S. 463; Railroad Co. v. Hanoum, 19 Colo. 162.
From the facts admitted we think the railroad company substantially complied with the act of congress in the location of its road, and that when it made the location of its line by survey, which was done before November 1877, the exact date not appearing in the record it became entitled to a right of way over the demanded premises, unless the respondent’s right as to the quarter section had already attached. On this point it is insisted for the respondent, that he was lawfully in possession of the land in question when the railway company took possession thereof, and that its entry thereon was in violation of his rights. It therefore becomes necessary to determine who was the first occupant. From the admitted facts, it appears that the quarter section, with the other adjoining tracts was unsurveyed land of the United States; that the same was not surveyed until 1884, nor *512the survey approved until 1885; that in 1877 the respond eut purchased “certain improvements, made by parties who had occupied the lands in -summer for dairy purposes;” that on May 1, 1878, he, with his family, moved on to the quarter section containg the strip of land in question, with intent to pre-empt the same, and, on August 7, 1885, filed his pre-emption or homestead claim, and received his patent therefor July 3, 1890. The railroad company made the preliminary survey for its line of road in 1876, completed its location .before November, 1877, and commenced grading; continued grading in 1878, and completed the road in 1879. It will thus be observed that the.company surveyed and located its line of road before the respondent purchased the improvements, commenced grading before he took actual possession of the quarter section, and completed the road before he filed his pre-emption claim. The railroad company, as is apparent, was, therefore, not only the first actual occupant of the strip of land in question, but the respondent must be charged with having had notice of its occupancy when he took possession of the quarter section, and when he filed his pre-emption claim. But the respondent seems to insist that because of his purchase of the improvements, his right of pre-emption stood in a better plight than if there had been no prior occupants, and that by relation, in some way, his rights attached to the land in question at some time prior to his actual occupancy, when the parties from whom he purchased occupied the land. To this position, it may be replied, that there is nothing in the record to show that the grantors of the respondent ever contemplated the acquisition of a preemptive or homestead right to the quarter section of land by their occupancy. Nor is the date of their possession shown. Hence, even if the law countenanced the sale of *513sucb rights, a point not necessary to determine here, the purchase of the improvements cannot avail the respondent in this case. Such purchase, from the earlier occupants, in no way affected the date of his settlement. Nor did it in any way render his position more efficacious. As against existing occupants, the mere possession of another is ineffectual to- create prior pre-emption rights. Quinby v. Conlan, 104 U. S. 420; Sproat v. Durland, 35 Pac. Rep. 682.
Nor can the doctrine of relation avail the respondent, so as ,to have his patent and possession relate back to a date anterior to the occupancy of the railroad company. That doctrine is remedial, and can never be so applied as to make that wrong which was innocent when done, or to divest prior and paramount rights lawfully acquired. Nor did the respondent’s patent relate back so as to divest the railroad company of its easement, which it acquired as the first occupant. The fact that the patent contained no reservation of the right of way is, under the facts of this case, immaterial. Flint & P. M. Ry. Co. v. Gordon, 41 Mich. 420.
The respondent’s own settlement can alone be considered, unaffected by his purchase of improvements, and that dates from May 1, 1878. He had no claim to the land when, prior to November 1877, the railroad company made the location of its line of road, and has shown-no right of recovery against the appellant.
The judgment must, therefore, be reversed, and the cause remanded, wdth costs against the respondent.
It is so ordered.
We concur: Zane, C. J., and Minee, J.