ZANE, O, J.:
This is an action to try the title and to recover the possession of the S. W. i- of section 29 in township 1 N., range 2 W., of the Salt Lake Meridian. The plaintiff claims title by virtue of a deed of conveyance by the Central Pacific Railroad Company to him, and the following grant of the United States to that company: “That there be, and is hereby, granted to the said company, for the purpose of aiding in the construction of said railroad and telegraph line, and to secure the safe and speedy transportation of the mails, troops, munitions of war, and public stores thereon, every alternate section of public land, designated by odd numbers, to the amount of five alternate sections per mile on each side of said railroad, on the line thereof, and within the limits of ten miles on each side of said road, not sold, reserved, or otherwise disposed of by the United.States, and to which a pre-emption *356or homestead claim may not have attached, at the time the line of said road is definitely fixed.” 12 Stat. U. S. 492. Afterwards congress passed another act, in force July 2, 1864, to amend the first-mentioned act of 1862. The third section of this latter act contains the following provision: “Any lands granted by this act, or the act to which this is an amendment, shall not defeat or impair any pre-emption homestead, swamp land, or other lawful claim, or include any government reservation or mineral lands, or the improvements of any bona fide settler.” 13 Stat. U. S. 358. The exception from the grant in the last law is more comprehensive than the one con-iained in the first. It declares the grant shall not defeat or impair any pre-emption homestead or other lawful claim, nor include the improvements of any bona fide settler. The first act excepted from the grant all lands to which homestead or pre-emption claims should attach before the line of the road was definitely fixed; while the latter act excepted,, not only pre-emption and homestead claims, but all other lawful claims to the land, and all improvements of bona fide settlers on the land as well. The line of the road of defendant’s grantor, at the point in question, was definitely fixed, and a survey thereof was filed in the office of the secretary of the interior on October 20, 1868. The land in dispute is part of a section located within the 20-mile limit, and is designated by an odd number, and had not been sold, reserved, or otherwise disposed of by the national government, nop had a homestead claim attached to it. It was within the grant unless a' pre-emption right had lawfully attached to it at the time the line of the road was definitely fixed, and the survey thereof had been filed in the office of the general land office. Section 2 of an act of congress approved July 16, 1868, and in force on that day, made the late *357territory of Utah a land district, and authorized the president to appoint a surveyor general, a register, and a receiver of public moneys for the same, with the same powers and duties, and entitled to the same compensation, prescribed by law in relation to land offices of the United States in the territories. 15 Stat. U. S. 91. Section 3 of the same act provides: “That the secretary of the interior is hereby authorized to locate said offices of surveyor general, register and receiver of public moneys at some suitable place in the territory.” And section 4 extended the pre-emption, homestead, and other laws of the United States applicable to the disposal of the public lands over the Utah district. It appears from the record that one Moroni Olney, a citizen of the United States, and the head of a family, settled upon the land in dispute after July 16, and before October 20, 1868, intending to claim a pre-emption right to it, and that he was in the actual possession thereof upon the last-named day, but that he did not make known his claim in writing to the register of the land office until May 29,1869, because the register did not open his office until that time; that he did make known his claim in writing to the register on that day, in which he described the land in dispute.
Section 2265, Rev. St. U. S. 1878 (2d Ed.), provides that “every claimant under the pre-emption law for land not yet proclaimed for sale is required to make known his claim in writing to the register of the proper land office within three months from the time ot the settlement, giving the designation of the tract, and the time of settlement; otherwise, his claim shall be forfeited, and the tract awarded to the next settler in the order of time on the same tract of land who has given such notice, and otherwise complied with the conditions of the land.” Section 2267, Id., requires the proof and payment for tffe *358lands claimed witbin 30 months after the date prescribed therein for filing the declaratory notice. Section 2270, Id., declares that “whenever the vacancy of the office either of register or receiver, or both, renders it impossible for the claimant to comply with every requisite of the pre-emption laws within the appointed time, such vacancy shall not operate to the detriment of the party claiming in respect to any matter essential to the establishment of his claim; but such requisition must be complied with within the same period after the disability is removed, as would have been allowed had such disability not existed.” After July 16, 1868, Utah territory constituted a land district, and the offices of surveyor general, register, and receiver were created, but the appointments were not made and the offices opened until May of the following year; but the pre-emption, homestead, and the other laws of the United States applicable to the disposal of public lands were extended over the district when the law took effect, on the 16th day of July, mentioned above; and we must regard a vacancy as existing in those offices until the officers entered upon the discharge of their duties in the following May. The land in the district was not proclaimed for sale until after the last-named date, and the pre-emption claimant could not make known his claim in writing to the register until he entered upon his duties; and the pre-emptor had three months after he did within which to do so. It appears from the record that Olney filed his declaratory statement with the register in less than a month after the office of register was filled. Having settled upon the land in question before the railroad company established its line of definite location, and filed its survey or map thereof in the general land office, and having filed his declaratory statement with the register of the land office of the district within the time *359allowed by law, we must bold that Olney’s pre-emption claim bad attached to tbe land in question, and existed tbereon, before tbe right of tbe Central Pacific Railroad became fixed, and that tbe land in dispute did not pass by tbe grant relied upon.
As we have seen, tbe act of congress in force on July 16, 1868, created a land district consisting of tbe late territory of Utah, and authorized tbe appointment of a surveyor general, register, and receiver of public moneys, with tbe same powers and subject to like duties given to and imposed upon like officers in tbe other territories; and tbe same law extended tbe pre-emption, homestead, and other laws of tbe United States applicable to tbe disposal of its public lands over it. After the creation of tbe land district and tbe extension of such laws over it, persons having tbe qualifications and mentioned in tbe law were authorized and bad tbe lawful right to settle upon tbe public lands therein subj'ect to pre-emption, and tbe right to improve tbe same; and, by so doing, they acquired lawful rights thereto. This, it appears from tbe record, Moroni Olney bad done; and it appears be complied with tbe requirements of the law as far as possible before tbe register of tbe land office was appointed, and that, within a month thereafter, be filed tbe declaratory statement tbe law required. When the acquisition of a right by an individual depends upon an act required of him within a specified time, and be is deprived by tbe government or person exacting it of tbe opportunity to do it then, but does it as soon as an opportunity is afforded later, tbe law will accept such performance, and secure him tbe right. Likewise, when an individual, in tbe prosecution of a' lawful right, does everything required of him as far as be is able, and fails in some particular because a public officer fails to discharge a duty towards *360him, the law will protect him. And the law having provided, as we have seen, that Mr. Olney might settle on the land in dispute, and acquire a pre-emption right to it, upon filing with the register of the land office of the district, within three months after such settlement, his declaratory statement, and there being no register until the expiration of six months thereafter to whom he could deliver it, and he having delivered his statement about the expiration of that time, the law protected his pre-emption right. Baty v. Sale, 43 Ill. 351; Kile v. Tubbs, 23 Cal. 432; Lytle v. State, 50 U. S. 314; Yosemite Valley Case, 15 Wall. 77. In the case of Kile v. Tubbs, supra, the court said: “In this case it appears the plats of the United States surveys of this land have not been sent to the proper land office; so that it is out of the power of the defendant to file his notice of claim to pre-emption, or to enter and purchase the land under the United States laws. So he has done all in his power, and has lost no rights acquired under those laws.” In the case of Baty v. Sale, supra, it was held where land was temporarily withdrawn from the market, and a party had filed his declaration of ,an intention to pre-empt it, the officers of the land office did right in excluding the time the land was not subject to entry in computing the year within which he had the right to make his proof and enter the land.
When Olney, the pre-emptioner in this case, filed his declaratory statement, his right must be deemed in law to relate to the date of his settlement on the land .in dispute. Therefore he had a lawful claim upon it when the grant to the railroad took effect, and the land in dispute was not included in it. The grant of land to the Central Pacific Railroad Company took effect when the line of definite location of its road was made; and the survey filed in the general land office; but it did not include the *361land in dispute, because it was at that time subject to the lawful right of Olney, a pre-emptor. But, when he afterwards failed to comply with the requisites imposed in order to obtain a title, the land became a part of the public lands of the United States, and was thereafter subject to the homestead entry of the defendant, Andrew Madsen, or to other entry or pre-emption. It did not vest in the ralroad company. Its grant was in prsesenti, an'd such lands as were excepted at the time it took effect and not pass to it afterwards. When Olney afterwards abandoned or lost his right, the land did not become subject to the operation of the grant. Railroad Co. v. Whitney, 132 U. S. 357; Railway Co. v. Dummeyer, 113 U. S. 629. In view of the facts appearing from the record, we hold the lands in dispute were subject to entry by the defendant, Andrew Madsen, on June 20, 1896, and that the patent of August 21, 1896, passed the title to him. The judgment is affirmed.
Bartch J., and Hiles, District Judge, concur.