
    [No. 12914.
    In Bank.
    September 3, 1889.]
    SOUTH YUBA WATER AND MINING COMPANY, Respondent, v. DELOVICO G. ROSA, Appellant.
    Corporation — Filing op Copy op Articles—Pleading — Demurrer — Nonsuit—Plea in Abatement. —The failure of a corporation to comply with the requirements of section 299 of the Civil Code as to the filing of a copy of the copy of its articles of incorporation in the office of the clerk of the county where its property is situated, is not ground of general demurrer when the complaint is silent upon the subject, nor is it ground of motion for a nonsuit that the plaintiff has failed to prove such filing; but such failure can only be made available by specially pleading it in the answer as matter of abatement to the action.
    Id. —Foreign Corporation. — Section 299 of the Civil Code does not by its terms apply to or include foreign corporations, but applies only to domestic corporations who have filed a copy of their articles of incorporation with the secretary of state of the state of California. There is no provision or authority in the statute by which foreign corporations are to file a copy of their articles of incorporation, with the secretary of state of this state.
    Water Rights — Appropriation — Riparian Rights — United States Homestead Claim—Injunction. —The riparian rights of a homestead claimant under the laws of the United States, whose settlement upon the land is subsequent to an appropriation of the water flowing across the same in its natural channel, by the owner of a water-ditch which taps the stream below the homestead claim, are subject and subordinate to the prior appropriation of the stream by the owner of the ditch, and the homestead claimant may be enjoined from diverting the water of the stream from the ditch.
    Appeal from a judgment of the Superior Court of Nevada County, and from an order denying a new trial.
    The facts are stated in the opinion.
    
      J. I. Caldwell, for Appellant.
    Compliance with section 299 of the Civil Code is a condition precedent to an action, and should be averred in the complaint and proved by plaintiff. (Ellisen v. Halleck, 6 Cal. 386; Lobdell v. Hopkins, 5 Cow. 516; Baker v. Fuller, 21 Pick. 321; Hentsch v. Porter, 10 Cal. 555; Coleman v. Woodworth, 28 Cal. 567; Bank of Stockton v. Howland, 42 Cal. 129; Whitmore v. S. F. S. U.,50 Cal. 145; Sweeney v. Stanford, 67 Cal. 635.)
    
      Thomas S. Ford, for Respondent.
    Failure of a plaintiff corporation to comply with section 299 of the Civil Code must be specially pleaded in the answer. (Southern P. R. R. Co. v. Purcell, 77 Cal. 69.) Section 299 does not apply to foreign corporations. The rights of plaintiff as prior appropriator are protected by the act of 1866. (Himes v. Johnson, 61 Cal. 259; Farley v. S. V. M. & I. Co., 58 Cal. 142; Osgood v. El Dorado W. & D. G. M. Co., 56 Cal. 571; Cave v. Crafts, 53 Cal. 135; Ware v. Walker, 70 Cal. 595.)
   Vanclief, C.

The plaintiff is a foreign corporation organized under the laws of the state of New York, and sues as the owner of a water ditch situated in Nevada County, in this state, extending from Rock Creek to plaintiff’s reservoir, near Blue Tent, a distance of about four miles, to recover damages for diverting therefrom the waters of the north branch of Rock Creek, which discharges its waters into the main channel of Rock Creek above the head of plaintiff’s ditch; and also to enjoin the defendant perpetually from diverting any water from Little Rock Creek.

The plaintiff had judgment for thirty dollars damages, and a perpetual injunction, as prayed for; and the appeal is from the judgment, and from an order denying defendant’s motion for a new trial.

The findings show that the plaintiff and its grantors have owned the ditch for more than twenty-five years prior to the commencement of this action, and that Little Rock Creek has contributed to its supply of water continuously during all that time, except when interrupted by the defendant. It appears that Little Rock Creek flows in a natural channel a distance of about one thousand feet through land possessed and claimed by defendant as a homestead, under a settlement thereon made in 1883, and for which he holds the receipt of the register of the United States land-office for the fees and compensation of register and receiver for the entry of the land as a homestead, under section 2290 of the United States Revised Statutes, but has received no patent therefor. Under this title and his possession he claims the rights of a riparian owner to the waters of Little Rock Creek.

The defendant filed a general demurrer to the complaint, which was overruled, but which he contends should have been sustained, because it was not alleged that plaintiff had complied with section 299 of the Civil Code concerning the filing of a copy of the copy of its articles of incorporation in the office of the county clerk of Nevada County, in which county plaintiff’s ditch is situated; and on the trial the defendant objected to any evidence until a compliance with section 299 of the Civil Code should be proved; and also at the close of evidence on the part of the plaintiff moved for a non-suit upon the same ground, which was denied.

Where the complaint contains no averment upon the subject, it is not a valid ground of demurrer that it does not affirmatively allege a compliance with the provisions of section 299 of the Civil Code; and in such case, the failure to comply with that section can be made available as a defense only by specially pleading it in the answer. (Phillips v. Goldtree, 74 Cal. 151; S. P. R. R. Co. v. Purcell, 77 Cal. 69.) As a defense, it is only' matter in abatement of the action, and if not specially pleaded, it is waived. In this case, it is not pleaded at all. Moreover, we are of opinion that section 299 of the Civil Code does not apply to foreign corporations. If a foreign corporation were incorporated by special act of a foreign legislature, or under a general act not requiring a copy of its articles to be filed with a secretary of state, it is manifest that it would be impossible for it to comply with section 299 of our Civil Code, in the absence of any law of this state requiring or even authorizing a foreign corporation to file a copy of its articles, or of its legislative act of incorporation, in the office of the secretary of this state.

The secretary of state, mentioned in section 299 of the Civil Code, means the secretary of this state, and not the secretary of a foreign state; and the phrase “every corporation now in existence,” was intended to embrace only corporations formed in this state, whether formed under the provisions of the Civil Code, or under the provisions of statutes existing prior to the Civil Code, and to exclude any doubt that the section was intended to be applicable to all corporations organized in this state before the enactment of the Civil Code. Whether or not it is expedient that foreign corporations should be required to deposit record evidence of their incorporation in every county of this state where they have property, in like manner as domestic corporations are required to do, is matter for consideration of the legislature alone.

The findings of fact by the trial court are amply sustained by the evidence and stipulations of counsel; and upon these findings it is clear that under the acts of Congress of July 26,1866, and July 9,1870, the riparian rights of the defendant as a homestead claimant are subject and subordinate to the prior appropriation of the waters of Little Rock Creek by the plaintiff, since it appears that the land upon which plaintiff’s ditch is situated, and over'which said creek runs, are public lands of the United States, except such right or title as the defendant acquired by his homestead settlement and proceedings in the United States land-office above stated, long subsequent to the appropriation of the waters in question by the plaintiff. (Cave v. Crafts, 53 Cal. 135; Osgood v. Water and M. Co., 50 Cal. 571; Farley v. S. V. M. & I. Co., 58 Cal. 142; Himes v. Johnson, 61 Cal. 259, Ware v. Walker, 70 Cal. 591.)

I think the judgment and order denying the motion for new trial should be affirmed.

Belcher, C. C., and Gibson, C., concurred.

The Court.

For the reason given in the foregoing opinion, the judgment and order denying the motion for a new trial are affirmed.  