
    HANSEN, Respondent, v. GOODRICH, Appellant.
    (No. 4,006.)
    (Submitted May 2, 1919.
    Decided June 2, 1919.)
    [181 Pac. 739.]
    
      Ejectment —Mortgage Foreclosure — Decree—Collateral Attach —Pleading and Practice — Pleadings—Amendment—Effect— D eniurrer — Confession—D efault.
    
    Judgments — Collateral Attack.
    1. Where the district court had jurisdiction of the subject matter in a mortgage foreclosure suit, as well as of the defendant by reason of personal service of summons and his general appearance in the action, the decree was not open to collateral attack.
    Pleading and Practice — Default—Piling Amended Complaint- — Effect.
    2. The effect of filing an amended complaint is to set aside a default on the original pleading.
    Same — Demurrer—Piling Amended Complaint1 — Effect.
    3. By filing an amended complaint after interposition of a demurrer to the original one, plaintiff confesses the demurrer.
    Same — Amendment—Effect on Original Pleadings — Default.
    4. Upon service and filing of a second amended complaint, the original and first amended pleadings became functus officio, and, under section 6537, Bevised Codes, defendant was required to answer within twenty days after such filing, for failure to do which default was properly entered.
    
      Appeal from District Court, Blaine County; Franh N. Utter, Judge.
    
    Ejectment by O. W. Hansen against G. H. Goodrich. Judgment for plaintiff, and defendant appeals.
    Reversed and remanded, with directions to enter judgment for defendant.
    Submitted on brief of Mr. I. W. Church and Mr. Fletcher Maddox, Counsel for Appellant; Respondent not appearing.
   MR. JUSTICE HOLLOWAY

delivered the opinion of the court.

This action in ejectment was brought to recover possession of land located in Blaine County, formerly in Chouteau County. It is alleged in the complaint that Sarah A. Hansen (neé Cook) owned the land at the time of her death; that plaintiff, as one of her heirs at law, succeeded to an undivided half interest therein; that defendant, on the fifth day of March, 1905, wrongfully ousted Sarah A. Cook, and still wrongfully withholds possession from plaintiff and his cotenant. Defendant by answer denied the plaintiff’s ownership or right to possession and any wrongful ouster, and as an affirmative defense set forth that Sarah A. Hansen, then Sarah A. Cook, the owner of the premises in question, mortgaged the same to defendant to secure an indebtedness; that she defaulted in payment of the mortgage debts; that defendant instituted an action to foreclose the mortgages; that such proceedings were had therein that a decree of foreclosure was duly given and made, an order of sale issued, and the property sold after due notice given; that defendant became the purchaser at «the sale; that a certificate of sale was delivered to him; that the period of redemption expired; that the property was not redeemed; and that he took possession by virtue of such proceedings. The reply admits the execution and delivery of the notes and mortgages, the institution of the foreclosure suit, and the proceedings taken thereunder, but alleges that the district court was without jurisdiction of the subject matter of the suit and of the person of Sarah A. Hansen, and was without jurisdiction to render the decree of foreclosure, and that the proceedings therein were and are null and void. The trial court, without indicating any infirmities in the proceedings in the foreclosure suit, held that the court in which that suit was prosecuted was without jurisdiction, and rendered judgment for plaintiff herein, from which defendant prosecuted this appeal.

The record discloses these facts: The foreclosure suit was instituted in the district court of Chouteau County, in which county the land was situated; that personal service of summons was made upon Sarah A. Hansen on June 17, 1902; that on July 8 her default was entered; that on the same day an amended complaint was served and filed; that on July 22 Mrs. Hansen filed a demurrer to the amended complaint, and thereafter, on September 29, secured from the court an order granting her until October 13 to answer,- that on October 18 a second amended complaint was served and filed, and on November 10 the default of Mrs. Hansen for want of an appearance was entered; that on November 17 proof was adduced, and the decree of foreclosure duly given and made; that on November 25 an order of sale was issued; that the property was duly noticed for sale and sold to defendant Goodrich on December 22; that a certificate of sale was delivered to the purchaser and duly recorded; and that thereafter, on March 6, 1905, a sheriff’s deed was executed and delivered to Goodrich. The respondent has not appeared in this court, and we are not advised as to the defects which it was claimed in the trial court vitiated the decree of foreclosure.

Counsel for appellant suggest in their brief that the contention below was that, since Mrs. Hansen’s demurrer to the first amended complaint was never disposed of by the court, she was not in default, and the court was not authorized to render the decree against her.

The proceedings taken in the foreclosure suit appear to be regular. The court had jurisdiction of the subject matter — the foreclosure of the mortgages upon lands located in the county where the suit was instituted — and jurisdiction of the person of Mrs. Hansen by reason of personal service of summons upon her and her general appearance in the action.

The effect of -filing the first amended complaint was to set aside'the default which was entered on July 8. (21 R. C. L. 589.) The effect of filing the second amended complaint was to confess the demurrer to the first amended complaint. (31 Cyc. 468.) When the second amended complaint was served and filed, the former, pleadings became functus officio (Ben Kress Nursery Co. v. Oregon Nursery Co., 45 Mont. 494, 124 Pac. 475), and Mrs. Hansen was required to answer within twenty days in the absence of any extension of the statutory time to plead.

It is further suggested that the trial court was apparently-influenced by language contained in the opinion of this court in Gettings v. Buchanan, 17 Mont. 581, 44 Pac. 77. In that case, however, the attack upon the judgment was direct while in this case it is collateral. In that ease the court did not hold that the answer to the original complaint served as an appearance to the amended complaint, but intimated that it might have had that effect but for the order secured granting time to plead to the amended complaint. The statute in force when the judgment was rendered in the Gettings Case was somewhat different from the statute which governed the proceedings in the foreclosure suit of Goodrich v. Hansen. Section 6537, Kevised Codes, in force when the foreclosure proceedings were pending, provides: “If the complaint is amended a copy of the amendments must be filed, or the court may in its, discretion require the complaint as amended to be filed and a copy of the amendments, or amended complaint must be served upon defendants affected thereby. The defendant must answer the amendment or complaint as amended within twenty days after service thereof or such other time as the court may direct and judgment by default may be entered upon failure to answer as in other eases.” This language is too plain to admit of the application of rules of construction. "When the second amended complaint was served upon Mrs. Hansen and filed in court, she was required to answer it within twenty days, and failing to do so, her default was properly entered.

We fail to discover any defects in the foreclosure proceedings which would subject the decree to collateral attack. Upon the undisputed facts disclosed by the record the court should have found for defendant.

The judgment is reversed, and the cause is remanded to the district court, with directions to enter judgment for defendant.

Reversed and remanded.

Mr. Chief Justice Brantly and Mr. Justice Cooper concur.  