— This action was brought to quiet the title in respondent, who was plaintiff in the court below, to a certain water right from Strong creek, Kootenai county, and a ditch through which said water was conducted to the point of use. Said ditch extends across the east one-half of the northeast one-quarter of section 35, township 57 north, of range 1 east, Boise meridian. It is alleged in the complaint that the respondent located on the northeast one-quarter of said see*381tion 35 in the year 1890, which land was then believed to be unsurveyed public land of the United States, and filed a possessory claim on said land under the laws of the state of Idaho; that appellant in 1895 wrongfully entered upon and took possession of the east one-half of said one hundred and sixty acre tract, and proceeded to improve the same by building thereon a house and other buildings, planting an orchard and vineyard, and constructing the ditch described in the complaint upon and across said land, through which ditch he used the water of Strong creek to irrigate his said orchard and vineyard; that at the time the improvements and ditch were put on said land the appellant was claiming said land as a squatter on the public domain; that in 1897 it was ascertained that said described land was part of an odd-numbered section which had been granted by act of Congress to the Northern Pacific Railroad Company, and that neither respondent nor appellant had any legal right thereto; that thereafter respondent purchased said land from the railway company, and after said purchase appellant consented to remove his improvements and orchard and vineyard from said land, which he did. It is then alleged that thereafter appellant made no use of said ditch and water from said creek, and wholly forfeited and abandoned the same, and that respondent located water from said creek on the first day of August, 1900, and sets up title to said ditch by reason of his owning the land. The answer denies the material allegations of the complaint, and, by way of affirmative matter, sets up settlement by appellant upon said eighty acre tract in 1895, and its improvement by him, and in that year his appropriation of water from said Strong creek, and the construction of said ditch at a cost of about $800, and the use of water through said ditch for irrigating said orchard and vineyard, and asks to have the rights of the parties determined and adjudicated. Judgment was entered in favor of respondent. A new trial ivas denied, and the appeal is from the judgment and order denying a new trial.
It appears from the record that the land across which said ditch was constructed was a part of the unsurveyed public domain of the United States, and that the government survey *382was not extended over the same until after the year 1897 — two years after said ditch was constructed; that, after the survey of said land so claimed by respondent and appellant, it fell within an odd-numbered section, and for that reason was included within the grant of the United States to the Northern Pacific-Railroad Company. The record shows that respondent thereafter purchased said one hundred and sixty acres of land of the railway company, on July 25, 1898. It also appears that the appellant moved onto the land over which he constructed said ditch in the fall of 1895. He had purchased the possessory right of one John Rivers thereto. Rivers filed his said possessory claim under the laws of this state on July 27, 1893, Rivers had erected on said land a cabin, and cleared about two acres of timber, prior to his sale to appellant. Appellant fenced forty acres, and cleared of brush and grubbed some four or five-acres, put out strawberries, raspberries, grapes, and apple, pear, and peach trees, and constructed said ditch at a cost of $800, and resided on said land from 1895 to 1898, and began irrigating said land in 1896. There was a dispute between respondent and appellant as to the right to the possession of said land, both claiming that it was open to settlement as a part of the public domain. After the government survey was extended over the same, it was learned that it came within the-grant to the Northern Pacific Railroad Company; and thereupon respondent purchased said land of the Northern Pacific Railway Company, successor in interest thereto of the Northern Pacific Railroad Company. He purchased with notice that appellant had constructed said ditch, and was claiming the right of way therefor over said land, and it was constructed by - appellant while he had peaceable possession of said land, and claiming the right to possession thereto, and before it was segregated from the public domain further than by a squatter’s right; appellant being the squatter and in possession thereof.
Hnder the facts of this case, we are clearly of the opinion-that appellant acquired a right of way for said ditch across said land. It is alleged in the complaint that appellant forfeited and abandoned said ditch and water right, but those *383allegations are not supported by the evidence. After it was ascertained that said land came within the grant to the railroad company, and respondent had purchased it from the company, appellant removed his improvements, buildings, orchards, fruit trees, etc., to an adjoining tract of land, and intends to extend said ditch to said tract for irrigation purposes. When asked on cross-examination of the use he proposed to make of said ditch, respondent replied that he wanted his land free from any claims or easements from appellant; did not want appellant to come on said land. He said: “I don’t intend to use said ditch. I intend to build a flume there.”
Several errors are assigned as to the admission of. certain evidence, all of which we have considered; and, from the views above expressed, it is not necessary for us to pass upon each separately, as appellant’s right to have his title to said ditch and right of way quieted is based upon his having constructed said ditch over the public domain while he was in the quiet and peaceable possession thereof, and under those facts the right of way is granted under the statutes of the United States.
It follows that the court erred in entering judgment in favor of respondent. The judgment is reversed, and the cause remanded for further proceedings in accordance with the views expressed herein. Costs are awarded to appellant.
Quarles, C. J., and Stoekslager, J., concur.