delivered the opinion.
This is a suit to enjoin interference with the flow of water in the channel of a nonnavigable stream to the head of plaintiffs’irrigating ditches. The facts are that Willow Creek rises in the Blue Mountains, flows in an easterly direction, in a well-defined channel, through the defendants’ and plaintiffs’ arid lands in Baker County, and empties into the East Fork of Powder River. In the spring the snow melts in these mountains, filling the banks of the creek, when it carries about four hundred inches of water, miners’ measurement, but in the summer only about thirty inches. In 1864 one Abel Morrison, plaintiffs’ predecessor in interest, diverted the water of said creek, which he used in irrigating about one hundred and seventy-five acres of his cultivated land, but, said diversion proving inadequate for the purpose, he, with others, in 1866 dug a ditch in a southerly direction from Rock Creek, and diverted water therefrom, and used it in irrigating his said lands. Plaintiffs’ predecessors thereafter diverted water from Marble and Spring Creeks, and from a swamp at the head of the North Fork of Willow Creek, which was also used in irrigating the same. *68In 1892 the defendants, having purchased one hundred and twenty acres of land situate above plaintiffs’ on Willow Creek, diverted therefrom in that year and in 1896 twenty-five and forty inches, respectively, of water, which they have used in irrigating their premises ; whereupon plaintiffs, claiming that such use was a wrongful infringement upon their rights, instituted this suit, and the court, having found upon the trial thereof that they had one hundred and thirty acres in cultivation lying under the ditches tapping Willow Creek, rendered a decree awarding them one hundred and ninety-five inches of water from that stream each year to July 15, and one hundred and thirty inches thereafter, and enjoining the defendants from interfering with the flow of that quantity in the channel of the creek through their premises, from which defendants appeal.
1. It is maintained by defendants’ counsel that, in order to secure priority in the appropriation of water, the stream or lake from which it is taken must be tapped at some point on the public domain, and that, the plaintiffs having alleged that they and their grantors diverted the water of Willow Creek at points on their own pi’emises, shows that no such appropriation had been made, and hence the court erred in overruling the demurrer to the complaint, and in awarding to plaintiffs the use of any water from said stream. The water of a nonnavigable stream is an incident to the soil through which it flows, and, as the United States is the primary proprietor of public lands, its grant of the waters thereof, in the Pacific Coast states, to the person having the priority of its possession (14 Stat. U. S. 253, c. 262), in the absence of a constitutional provision or statute declaring water to be public property, necessarily cuts off the right of a subsequent settler to divert the water under a claim of prior *69appropriation. Title by relation gives to the first settler upon the public land the priority of possession of the water flowing through the same (Faull v. Cooke, 19 Or. 455, 26 Pac. 662, 20 Am. St. Rep. 836; Larsen v. Oregon Ry. & Nav. Co. 19 Or. 240, 23 Pac. 974 ; Johnson v. Bridal Veil L. Co. 24 Or. 182, 33 Pac. 528 ; Cole v. Logan, 24 Or. 304, 33 Pac. 568), though he may never appropriate the water to a beneficial use. If a lower riparian proprietor had acquired a right to the waters of Willow Creek prior to plaintiffs’ diversion, such right would necessarily defeat their appropriation of the water, because the stream at the time of the diversion was not flowing through public lands. The right of prior appropriation is limited to the use of water by the pioneer settler before any adverse claims of riparian proprietors attach to the stream from which the water is taken, and not to-the points of diversion, which may be either within or beyond the boundaries of the tract selected by such settler. Upon principle this must be so, for, if the settler could not divert the water except at points on the stream above his boundary, in order to make a valid appropriation, the cost of conducting it to his premises might be so great as to prohibit its use, thereby defeating the very object of congress, and depriving those entitled to the reward offered for the encouragement of mining, agriculture, and manufacturing, notwithstanding the pioneers in these industries might, with but little expense, be able to appropriate the water to some beneficial use through conduits constructed wholly upon their own premises.
2. The complaint asserts a right only to the use of a given quantity of water from Willow Creek, acquired by. prior appropriation, but by the reply the plaintiffs claim the right to the entire flow thereof through their premises by reason of their riparian proprietorship, whereupon *70the defendants moved to strike out the averment of new matter in the reply on the ground that it was redundant, immaterial, sham, frivolous, and irrelevant; but, the motion having been overruled, a demurrer was interposed to the entire reply on the ground that it did not state facts sufficient to constitute a defense, and to said averment of new matter therein for the reason that the same did not state facts sufficient to constitute a cause of suit, which was also overruled, and it is insisted that the court erred in these particulars. The first settler upon public land through which a stream of water flows may either divert the water, and use it for a benéficial purpose, or exercise the common-law right prevailing in the Pacific Coast states, where the modified rule of riparian ownership is still in force, and insist that the stream shall flow in its natural channel undiminished in quantity, except when applied to the natural use of the upper riparian proprietors, and for irrigation, if the stream affords a sufficient quantity of water for the latter purpose : Low v. Schaffer, 24 Or. 239 (33 Pac. 678); North Powder Milling Co. v. Coughanour, 34 Or. 9 (54 Pac. 223).
3. The right of appropriation is incompatible with the doctrine of riparian proprietorship (Kinney, Irr. § 272; Pomeroy, Rip. Rights, § 132), and hence the allegation of new matter in the reply constitutes a departure from the averments of the complaint: 6 Ency. Pl. & Pr. 462 ; Mayes v. Stephens, 38 Or. 512 (63 Pac. 760). A depax’ture in a pleading in a suit in equity can not be so prejudicial to a party as in an action at law ; for in the former, the cause being tried by the court, it can segregate the testimony applicable to the allegations of the complaint, and reject the immaterial testimony in suppox't of the inconsistent averments of the reply, which a jury can not well do.
*714. The departure being manifest, the question to be considered is whether the attention of the trial court was properly called to the defect. Sham, frivolous, and irrelevant replies may be stricken out on motion and upon such terms as the court, in its discretion, may impose : Hill’s Ann. Laws, § 79. It will be remembered that the motion assails only the new matter in the reply, while the statute contemplates an attack upon the entire reply for the reasons assigned.
5. The defendant may demur to any new matter contained in the reply, when it appears upon the face thereof that such matter is not a sufficient reply to the facts stated in the answer : Hill’s Ann. Laws, § 79. The demurrer challenged the entire reply for the reason prescribed by the legislative assembly for assailing new matter therein only, and it contested the new matter for a reason not based upon the statute. Neither the motion nor the demurrer was sufficient to call to the court’s attention the question of departure.
6. The objection to the reply upon that ground must be deemed waived upon the principle that, the motion and demurrer assailing the reply being mere technical objections, it was necessary specifically to state the reasons upon which they were predicated : Bilyeu v. Smith, 18 Or. 385 (22 Pac. 1073); Hermann v. Hutcheson, 33 Or. 239 (53 Pac. 489); State ex rel. v. Estes, 34 Or. 196 (51 Pac. 77, 52 Pac. 571, 55 Pac. 25). A contrariety of judicial utterance prevails as to the proper practice of raising the question of departure, most courts holding that advantage thereof may be taken by a general demurrer, while others conclude that this may be accomplished by a motion to strike out: 6 Ency. PI. & Pr. 468. But, however this may be, the decree complained of being *72predicated upon plaintiffs’ alleged right to the use of the waters of Willow Creek in consequence of a prior appropriation thereof, and not upon any claim as riparian proprietors to have the water flow' in the channel of the stream undiminished in quantity, it is evident that the defendants were not prejudiced in any manner by the court’s action in denying their motion or in overruling their demurrer.
7. It is contended that, the plaintiffs having neither alleged nor proven a diversion in accordance with any local custom or law, as contemplated by the act of congress of July 26, 1866 (14 Stat. U. S. 253, c. 262), the court erred in not sustaining the defendants’ motion for a nonsuit. The act of congress to which reference is made provides that whenever, by priority of possession, rights to the use of water for mining, agriculture, manufacturing, or other purposes have vested and accrued, and the same are recognized and acknowledged -by the local customs, laws, and decisions of courts, the possessors and owners of such vested rights shall be maintained and protected in the same. The water rights thus granted were limited by congress to territory in which the local customs, laws, and decisions of the courts recognized and enforced thejprinciple that a superior right to the use of water flowing through public land was secured by priority of possession. The discovery of gold in'California brought.thereto a vast number of immigrants, who, in their search for this precious metal, were compelled, in the'absence of any legislation upon the subject, to adopt local regulations for their own protection, prescribing the area and boundaries of public land which a miner might select, and defining his right in respect to the use of water in separating the gold from the baser material: Lux v. Haggin, 69 Cal. 255 (10 Pac. 674). *73Every discovery of gold created excitement, causing the searchers therefor to abandon their labors, and to flee to the new “diggings, ’ ’ hoping thereby to improve their condition. These influxes of population necessitated local regulations suited to the mining district in which they were enforced, and calculated to promote the greatest good to the greatest number. As the valuable and profitable mining territory in California was soon taken by claimants without all being supplied, prospecting for gold led to its discovery in other parts of the Pacific Coast, where new rules were adopted. These regulations became the foundations of right in respect to the possession of land and the use of water thereon, and such customs, upon the allegation and proof thereof, were enforced by the decisions of courts. Nowhere in the United States did such conditions exist except on the Pacific Coast, and congress, in referring to these local customs, laws, and decisions, evidently intended to limit the operation of the act of July 26, 1866, to the specific territory in which they were a part of the common law established therein by the primitive legislators, and not to make the allegation and proof thereof prerequisites to the establishment of a right thereunder. While an allegation and proof of the customs adopted by miners may have been necessary in order that a court might properly apply them in determining the extent and boundaries of the claimant’s possession of public land, we fail to see how such customs can have any application to farming lands, the area of which is determined by act of congress in limiting the quantity which the entryman may secure, or in prescribing the limit of his right of appropriation of water to its irrigation, which is measured by the rule of necessity. We do not think it essential to allege or prove the existence of any custom in order to secure the right of appropriation for *74irrigation, .unless the party asserting such right relies thereon, which is not apparent in the case at bar', and hence no error was committed in overruling the motion for a decree of nonsuit.
It is maintained that the plaintiffs have an abundant supply of water for irrigation, derived from other streams, and do not need any from Willow Creek for that purpose, and that the latter stream is the only source from which the defendants can secure water for irrigation, and, this being so, the court erred in denying them the right of appropriation therefrom, without which their lands will be rendered valueless. The plaintiffs own six hundred and forty acres of land, and have in cultivation about four hundred acres, which annually needs irrigation, except such area thereof as is alternately summer-fallowed. While there is a diversity of opinion in respect to the supply of water to plaintiffs’ lands from streams other than Willow Creek for the irrigation thereof, we think the testimony clearly’shows that it is insufficient for such purpose after the freshets caused by the melting snows have subsided.
It is contended that during the three years immediately preceding the commencement of this suit the plaintiffs have enlarged the area of their cultivated land by breaking up about one hundred acres, and, such improvement not having been made within a reasonable time from the original diversion, they are not entitled to the use of any water to irrigate the land so recently brought under cultivation. If the newly-plowed land were irrigated with water taken from Willow Creek, or if the defendants were riparian proprietors on either of the other streams from which plaintiffs secure water, the point insisted upon might be well taken ; for the rule is settled in this state that the water must be applied to a beneficial use within a reasonable time from its diversion : Hindman v. Rizor, *7521 Or. 112 (27 Pac. 13); Cole v. Logan, 24 Or. 304 (33 Pac. 568); Low v. Rizor, 25 Or. 551 (37 Pac. 82). The testimony, however, conclusively shows that the newly-cultivated land is irrigated by water diverted from Rock Creek, and that the quantity taken by plaintiffs from Willow Creek has not been enlarged since the original diversion. The plaintiffs having the prior appropriation of the water of Willow Creek, the defendants could appropriate only the surplus flowing in the stream after the right of the other proprietors had been supplied, and, this being so, no error was committed in restraining them from interfering with the flow of the quantity to which plaintiffs were entitled, and hence the decree is affirmed.
Affirmed .