The sole question raised by this appeal is whether the undertaking upon appeal from the justice to the district court must be approved by the clerk of the district court to which the appeal is taken before the same is served upon the adverse party or his attorney. It is claimed that the security contract does not become an undertaking, within the meaning of the statute, until it has been approved by the clerk of 'the district court, and filed; and that proof of its approval and filing should be served with the undertaking, that service of an approved undertaking is jurisdictional. Therefore, in this case, the undertaking on appeal having been served upon appellee before, and not after, its approval, that the statute was not complied with, and the district court did not acquire jurisdiction of *554the case. This contention is based entirely upon the phraseology of the appeal statute. “The appeal is taken by serving the notice of of appeal on the adverse party or his attorney and by filing the notice of appeal together with the undertaking required by law with the clerk of the district court of the county to which the appeal is taken.” Section 6771, Rev. Codes. “To render an appeal effectual for any purpose an undertaking must be executed on the part of the appellant by sufficient surety, * * * which undertaking shall be approved by and filed in the office of the clerk of the district court of the county to which the appeal is taken.” Section 6772, Id. “The undertaking for appeal must be served with the notice.” Section 6776, Id.; it is provided by section 6775, Rev. Codes, that the appellant, in lieu of an undertaking, may deposit with the clerk of the district court in whose office the notice of appeal is required to be filed a sum of money equal to the amount for which such undertaking is required, and notice of the making of such deposit may be given with the notice of appeal. “Upon the filing of the notice of appeal and undertalcing, or the making of the deposit prescribed in section 6775 in the office of the clerk of the district court, such clerk shall immediately mail to the justice of the court in which the judgment appealed from was rendered a written notice thereof, specifying the court in which the judgment was rendered, the names of the parties, the date and amount of the judgment appealed from and stating whether the undertaking filed or deposit made entitles the appellant to a stay of execution and requiring such justice to transmit to such clerk the record required by law.” Section 6777, Id. The statute makes the service, approval, and filing of the undertaking prerequisite to the transfer of jurisdiction from one court to the other. The service without approval, or the approval without filing, or both the filing and approval without service, will not answer. The order of performance of the separate steps necessary to be taken in accomplishing the transfer is the order in which they are named. The first step is the service of the notice of appeal and undertaking upon the adverse party or his attorney, and the last one necessary to the transfer of jurisdiction is the filing of the notice of appeal and undertaking in the clerk’s office. Section 6771, quoted above, is unambiguous, and does not require interpretation. The service of the notice of appeal should precede its filing, because this is the order of performance indicated -by its language, and the undertaking for appeal must be served with the notice. Section 6770; Richardson v. Campbell, 9 N. D. 100, 81 N. W. Rep. 31. Thus, in Nevada, California, and Montana, the statute for appeal in civil cases provided that “an appeal should be made by filing with the clerk of the court in which the judgment or order appealed from is entered a notice stating the appeal from the same, and by serving a copy of the notice upon the adverse party or his attorney.” Under this statute it was held that the filing of the notice of appeal must precede or be contemporaneous with the service of the copy on the adverse party. Buffendeau v. Edmondson, 24 Cal. 95; Lyon Co. v. Washoe Co., 8 Nev. 177; Courtright v. Berkins, *5552 Mont. 404. When the undertaking is presented to the clerk of the district court for approval, and to be filed with the notice of appeal in his office, proof of the service of the notice and undertaking should also be produced and filed. Eaton v. Supervisors, 42 Wis. 318. The clerk has a judicial function to perform. Before approving the undertaking for appeal he must determine whether it is a mere appeal undertaking, or whether it is, in form and otherwise, sufficient to accomplish both the transfer of the case and a stay of proceedings in the court below. He must determine, in a tentative way, from proofs presented to and filed with him, whether the notice of appeal and undertaking have been served upon the adverse party, and within 30 days after the rendition of the judgment from which the appeal is being taken; and at least prima facie evidence of such service should accompany the papers presented for filing, not only to show his right to file the same, but to enable him truthfully to give the required notice to the justice of the peace under section 6777, Rev. Codes.
The jurisdiction of the district court attaches immediately upon the filing of the notice of appeal and undertaking in the clerk’s office. No time can intervene between the time of severing of jurisdiction of the justice and the attaching of the jurisdiction of the court to which the appeal is taken. This is manifest from the reading of section 6777. Immediately upon the filing of the notice of appeal and undertaking the clerk is required to mail to the justice of the court in which the judgment appealed from was rendered a written notice thereof, specifying the court in which the judgment was rendered, the names of the parties, .the date and amount of the judgment appealed from, and stating whether the undertaking filed entitles the appellant to a stay of execution, and requiring such justice to trans-to such clerk the record required by law. The word “immediately,” as used in this section, means “without interval of time,” “without delay.” No time is given' after the filing of the papers .in the clerk’s office within which they may be removed for service. On the contrary, service- must precede filing, and proof of it must be made as a preliminary to and foundation for the filing of the notice and undertaking of appeal. The clerk of the district court cannot notify the justice from whom the appeal was taken to send up the record until the district court has acquired jurisdiction of the case. Therefore all acts necessary to transfer jurisdiction must be performed before the one which must be immediately followed by the notice to send up the record. The statute which requires that the undertaking shall be approved and filed is equally imperative as to both the approval and filing. If, therefore, thp filing of the undertaking must follow its service, the approval may also follow its service. Consequently, the undertaking may be served before it is either approved or filed. But the contract of indemnity is an undertaking before approval and before filing, sufficient to bind the surety when it is subsequently filed and approved. When the surety signs arid delivers the undertaking with *556intent to have it delivered and accepted, it does not lie in his mouth to repudiate the liability thereby incurred, providing the further acts necessary to perfect an appeal in the given case follow in sequence, and without delay. State v. Pepper, 31 Ind. 76; Wright v. Harris, 31 Iowa, 272; Webb v. Baird, 27 Ind. 368, 89 Am. Dec. 507. If, in the case at bar, the surety on the undertaking could, in hostility to the right of appellee, have changed his relation to the appellee within the time consumed in perfecting the approval and filing of the undertaking after it had been served upon the appellee, he certainly did not do so. The undertaking was approved and filed, and, as to the appellant and the surety, became a binding undertaking.
(93 N. W. Rep. 860)The requirement of an undertaking for appeal is not wholly for the benefit of appellees, but a public policy in discouragement of frivolous and vexatious litigation enters into such enactments. Brown v. Ry. Co., 10 S. D. 635, 75 N. W. Rep. 198, 66 Am. St. Rep. 730; Rudolph v. Herman, 2 S. D. 399, 50 N. W. Rep. 833; Santom v. Ballard, 133 Mass. 464. Nevertheless, the obligor or his surety cannot take advantage of nonapproval to escape liability after a breach of condition. Prescott v. Bacon, 64 Iowa, 702, 21 N. W. Rep. 151; Whitehurst v. Hickey, 15 Am. Dec. 170; Mendocino Co. v. Morris, 32 Cal. 145; People v. Edwards, 9 Cal. 286. The appeal is ineffectual for any purpose unless the undertaking has been approved and filed, but the 1 statute does not say that, to render the appeal effectual, the undertaking shall be approved and filed before it is served. In this case the notice and undertaking" were served together within proper time; the undertaking was approved by the clerk and filed in his office with the notice of appeal; the statute was literally complied with. The undertaking was legally delivered, and the surety thereon, from anything appearing in this record to the contrary, would be holden for the costs adjudged on dismissal of the appeal by the district court, if that judgment were permitted to stand. Section 5582, Rev. Codes; In re Weber, 4 N. D. 119, 59 N. W. Rep. 523, 28 L. R. A. 621; Prescott v. Bacon, 64 Iowa, 702, 21 N. W. Rep. 151. Our conclusion is that the court erred in dismissing the appeal from justice court.
The judgment of the district court is reversed, and that court is directed to reinstate said appeal the same as if its judgment of dismissal had never been made.
All the judges concurring.