Plaintiff applied to this court for a writ of prohibition, and an alternative writ was issued and an answer and return has been filed, and defendant has also moved to dismiss on the ground that the petition does not state sufficient facts to justify the issuance of the writ.
It appears that on February 12, 1913, a complaint was filed in the district court of the fifth judicial district in and for Oneida county by the Union Iron Works, a foreign corporation, as plaintiff, against Conrad Kissler, as defendant. A writ of attachment issued and certain property belonging to the defendant was levied upon, and thereafter and on February 21st, a motion was filed by the defendant to dissolve the writ of attachment, and a hearing was had thereon on March 10th following. On March 17th, the motion to dissolve the attachment was denied. On February 24th, 1913, the defendant filed his answer, and on March 12th, served notice on the Union Iron Works, under the provisions of see. 4915 of the Revised Codes, requiring security for costs on the grounds that the plaintiff, Union Iron Works, was a foreign corporation, and this notice was filed with the clerk of the district court on March 16th. Thereafter and on March 24th, the Union Iron Works filed a bond for costs in the sum of $100, but no notice thereof was given to the defendant Kissler or his attorney. Thereafter and on April 19, 1913, O. M. Hall, attorney for the defendant Kissler, wrote to the judge of the district court at Malad, advising the judge that he had served *249notice on the Union Iron Works requiring it to give security for costs under .the provisions of sec. 4915, Rev. Codes, and that he had received no notice of the company’s having complied with that provision of the statute, and suggesting to the court that as counsel understood the statute, the service of such a demand, stayed all proceedings until the required undertaking was given, and that it was his intention to move the dismissal of the action under the provisions of see. 4916, Rev. Codes, when the court convened at American Falls. On the same day that the foregoing letter was written, the judge of the district court, sitting at Malad, made an order transferring the ease of Union Iron Works v. Conrad Kissler to the newly organized county of Power, and ordered and directed that all the papers in the case be transmitted to the clerk of the district court at American Falls in Power county. 'Thereafter, and on the 19th day of May, upon the convening of court at American Falls, counsel for Kissler moved the court for an order dismissing the case of Union Iron Works v. Conrad Kissler, upon the grounds that the plaintiff had been required under the provisions of sec. 4915, Rev. Codes, to give security for costs and that it had failed and neglected to comply with the statute in that respect, and that more than thirty days had elapsed since the service of notice requiring security for costs, and that under the provisions of sec. 4916, Rev. Codes, the defendant was entitled to have the action dismissed. The court denied the motion, and set the ease for trial on May 28, 1913, at 10 o’clock A. M. Counsel for Kissler thereupon applied to this court for a writ of prohibition, prohibiting the trial court from further proceeding with the action.
The return made by the district judge shows that subsequently to the issuance of the writ from this court but prior to service thereof the judge reached the conclusion that the bond of $100 was not sufficient to meet the requirements of see. 4915 of the Rev.-Codes, and thereupon vacated the setting of the case for hearing on May 28th, and required that the plaintiff forthwith file a statutory bond in the sum of $300, which bond was immediately filed, and that subsequent to the *250making of the foregoing order and filing of the bond the alternative writ of prohibition issued herein was served upon the district judge. The question with which we are now confronted is the proper order to be made by this court under the foregoing circumstances.
1. Under the provisions of sec. 4915, Rev. Codes, it was imperative upon the plaintiff, Union Iron Works, on demand therefor being made, to file a good and sufficient undertaking in the sum of $300, as security for costs, before it could further proceed with the action, and on failure to do so within thirty days after the service of notice and upon proof of service thereof the defendant was entitled to have the action dismissed. Under the provisions of see. 4915, the district judge has nothing to do with the fixing of the amount of the bond or conditions thereof. The statute fixes the amount of the bond and its conditions. It must be an undertaking, providing for the payment of “such costs and charges as may be awarded against the plaintiff by the judgment or in the progress of the action” to any amount that may be incurred therein, “not exceeding the sum of $300.” In other words, the sureties on such an undertaking must obligate themselves to pay all the costs and charges incurred up to the sum of $300. The supreme court of California in Meade County Bank v. Bailey, 137 Cal. 447, 70 Pac. 297, has passed directly on the same statute in that state, and directly held that “the court has no power to fix a less sum or to change the amount and condition of the bond fixed by the statute, and after the lapse of thirty days, without the giving of the statutory bond, ’ ’ the action may properly be dismissed.
2. It is argued on behalf of the trial judge that the defendant Kissler, having appeared in the trial court and moved for a dismissal of the attachment and having filed an answer in the case, has waived the right to demand security for costs under the provisions of see. 4915.
In support of this argument, counsel rely on Sciutti v. Union Pac. Coal Co., 30 Utah, 462, 85 Pac. 1011, 8 Ann. Cas. 942. In that case the supreme court of Utah was considering the provisions of sec. 3354 of the Rev. Statutes of that state, *251which s.eems to be the same as our statute, and held that where a defendant knew that the plaintiff was a nonresident and thereafter filed an answer in the case and made no demand for security for costs until the day the ease was called for trial, and after his application was denied proceeded to the trial of the ease without excepting to the action of the court ordering the trial to proceed, he thereby waived the right to demand the undertaking' as authorized by the statute. We think that case states a sound principle of law, but the facts are very different in this case. Here it clearly appears from the record that the demand was made long before the ease was set for trial or there was any probability.of trying the case. The defendant followed this demand up from time to time and subsequently moved a dismissal of the action on the ground that no bond had been given, as required by statute, and this motion was made before any order was made setting the case for trial. Clearly, the defendant did not waive his right to demand security for costs.
3. The only remaining question to be determined is whether a failure to give the bond required by the statute for the period of thirty days ipso facto ousts the court of jurisdiction, or if a bond may thereafter be given, provided it is done before the case is finally dismissed. Sec. 4916, Rev. Codes, provides as follows:
“After the lapse of thirty days from the service of notice that security is required, or of an order for new or additional security, upon proof thereof, and that no undertaking as required has been filed, the court or judge may order the action to be dismissed.”
It will be seen that the foregoing section of the statute authorizes the district judge to dismiss such an action after the lapse of thirty days, upon proof being made that the required notice has been served on plaintiff and that the period of thirty days has elapsed, and that the necessary bond has not been given. This is clearly a matter which may be waived. A defendant might not make such a demand or if he did make a demand he might waive the length of time the plaintiff is given to furnish the bond. We are of the *252opinion that even though 'the party required to give the bond should fail to give it within the thirty-day period, that he might nevertheless give the bond thereafter if he did so prior to the dismissal of the action by the district court. On the other hand, the defendant in such case is clearly, entitled to have the action dismissed upon motion and proof at any time after the lapse of thirty days from the date of demand and a failure to give the bond. The required bond having been given in this case prior to the service of the writ, we do not feel that this court should further stay the proceeding in the district court except as hereinafter specified. That court has not lost jurisdiction, and the alternative writ heretofore issued will be quashed and the proceedings herein will be dismissed. All the costs of this proceeding, including the expenses of counsel for the plaintiff Kissler in attending upon this court and procuring the writ, and also for appearance upon the return day, shall be taxed against the Union Iron Works, and the district court will require that the same be paid as a condition precedent to taking any further proceedings in the trial court. Upon failure to pay the costs, as above taxed, within a reasonable time, the trial court will dismiss the action. Judgment ordered accordingly.
Sullivan and Stewart, JJ., concur.