Motion for a writ of supersedeas.
The plaintiff brought this action for the foreclosure of a mortgage executed by one Palmer upon certain lands in Santa Clara County. After the execution of the mortgage, Palmer conveyed the property, and thereafter died. The defendants in the action are persons who have acquired an interest in the mortgaged premises under Palmer subsequent to the date of the mortgage. Palmer’s grantee made an agreement with the appellant, Radovich, for a conveyance of a portion of the mortgaged premises, under which Radovich entered into possession, and thereafter made a mortgage of said premises to the respondent, Chielovich. Chielovich, in addition to his answer to the plaintiff’s complaint, set up this mortgage by way of a cross-complaint against Radovich, and issue was joined thereon by Radovich. The court rendered judgment in favor of the plaintiff for the amount of his claim and for a sale of the prerm ises, and also in favor of Chielovich for the amount of *486his claim against Radovich, and directed that out of the proceeds of said sale the sheriff, after paying the claims of the plaintiff and certain other prior liens, — amounting in the aggregate to about thirty-three thousand dollars,— should, if there were any surplus proceeds in his hands therefor, pay to Chielovich the' amount of his claim against Radovich, and if the surplus proceeds therefor were insufficient to make such payment, judgment should be docketed in his favor against Radovich for the deficiency. Radovich appealed from the whole of the said judgment, making both the plaintiff and Chielovich respondents, and gave an undertaking in the sum of three hundred dollars for the costs of appeal, and also an undertaking in the sum of ten thousand dollars against waste, that amount having been fixed by the judge of the court. The undertaking against committing waste, after reciting the order of the judge fixing the amount, is, that the surety, “ in consideration thereof and of the premises, does undertake and promise, and does acknowledge itself bound in the sum of ten thousand dollars, that during the possession of such real property by the appellant he will not commit, or suffer to be committed, any waste thereon, and does undertake and promise that this undertaking for a stay of proceedings herein is given in compliance with the provisions of section 945 of the Code of Civil Procedure of the state of California, and in conformity to the order of court in this connection, as aforesaid.” After the appeal had been taken, Chielovich caused an order of sale to be issued upon the judgment, and placed it in the hands of the sheriff for execution, and the sheriff being about to sell the premises under said order of sale, Radovich applied to this court for a writ of supersedeas pending the appeal, and urges in support thereof that the undertaking given by him is sufficient to stay the execution of the judgment.
Section 942 of the Code of Civil Procedure provides that an appeal from a judgment directing the payment of money does not stay the execution of the judgment, *487unless an undertaking be given on behalf of the appellant in double the amount of the judgment for the payment of the judgment in case it be affirmed. And section 945 provides that “ if the judgment or order appealed from direct the sale or delivery of possession of real property, the execution of the same cannot be stayed, unless a written understanding be executed on the part of the appellant, with two or more sureties, to the effect that during the possession of such property by the appellant he will not commit, or suffer to be committed, any waste thereon”; and the same section further provides that “ when, the judgment is for the sale of mortgaged premises and the payment of a deficiency arising upon the sale, the undertaking must also provide for the payment of such deficiency.” In Johnson v. King, 91 Cal. 307, it was held that if the appellant from a decree of foreclosure which provides for the payment of a deficiency upon the sale would stay the execution of the judgment, he must give an undertaking for the payment of such deficiency, even though he is not the party against whom the deficiency judgment was rendered; and this rule was affirmed in Spence v. Scott, 95 Cal. 152.
The judgment in the present case, after providing for the sale of the mortgaged premises and the payment of the claims whose lien is prior to that of Chielovich, provides that if any surplus proceeds shall thereafter remain, the sheriff shall pay therefrom to Chielovich the sum of $3,849.40, with interest from the date of the decree to the date of sale, or so much thereof as such surplus proceeds will pay; and that if the surplus moneys shall be insufficient to pay said amount to defendant Chielovich, " the judgment of this court shall be docketed for such balance against the defendant Bozo Radovich in favor of said Elia Chielovich, and that the defendant Bozo Radovich, who is personally liable for the payment of the debt secured by the said defendant’s mortgage, pay to the said defendant Elia Chielovich the amount of such deficiency, and judgment with interest thereon at the rate of seven per cent per annum from *488the date of said last-mentioned return and judgment, and that the defendant Elia Chielovich have execution therefor against Bozo Kadovich.,, This provision in the. judgment brings the case within the express language of the statute; and upon the authority of the foregoing cases, the undertaking must be held insufficient to stay the execution of the judgment.
The clause in the undertaking that it is given in compliance with the provisions of section 945 of the Code of Civil Procedure does not extend its effect beyond the condition for which it was executed. The order of the court limits the condition of the undertaking to the commission of waste on the part of the appellant, and in any action upon the undertaking, the surety could be held liable only upon proof that waste had been committed on the part of the appellant. In any attempt to recover from the surety the amount of any deficiency in the judgment, he would have a perfect defense in the fact that his undertaking made no provision therefor. The provision of section 945 requiring the judge to fix the amount of the undertaking against waste is distinct from the clause which requires that the undertaking must also provide for the payment of a deficiency; and the authority of the judge to fix the penalty of the undertaking is limited to the object named in the clause in which it is granted.. For the purpose of staying the execution of the judgment, the appellant must give an undertaking against waste, and also an undertaking to pay the deficiency,—the former in the amount that may be fixed by the judge, and the latter for the entire deficiency, whatever that amount may prove to be.
It was competent for Chielovich to cause the clerk of the court to issue the order of sale upon the judgment and place it in the hands of the sheriff for execution. By virtue of his cross-complaint against Eadovich, he was the plaintiff as against Eadovich for the purpose of foreclosing his mortgage, and the judgment thereon, although rendered in the same action with that of the plaintiff Gutzeit, was a judgment in his favor against *489Radovich which he had the right to enforce. In any sale of the premises under such judgment, he could receive no portion of the proceeds until after the satisfaction of the prior liens, but unless the execution of the same was stayed, he had the right to have the premises sold for the purpose either of receiving therefrom the amount of his judgment against Radovich, or if there should be a deficiency, of ascertaining the amount of such deficiency and collecting the same from other property of Radovich. The plaintiff could not, either capriciously or by any arrangement with the appellant, allow the judgment in his favor to remain unexecuted, and the amount of its lien upon the mortgaged premises thereby to increase to the detriment of the junior mortgagee; but after the entry of the judgment by which the amount and priority of the several liens upon the premises was determined, either party to the judgment had the right to its execution. A junior mortgagee has a right, in an action to foreclose his mortgage, to bring before the court the holder of a prior mortgage which has matured, and obtain a decree for the sale of the premises and the satisfaction of his own mortgage after payment of the amount of the prior mortgage, and when, in an action brought by the holder of the prior mortgage, a junior mortgagee, by suitable pleadings, as between himself and the mortgagor, has the amount of his mortgage determined and provision made in the judgment for its sale, he has the same right to have the judgment executed as though he had himself instituted the action.
Chielovich did not waive his right to the enforcement of the judgment by reason of not objecting to the insufficiency of the undertaking at the time it was given. He had obtained a judgment in his favor, and there remained nothing more for him to do in order to entitle him to its enforcement. He was at liberty to enforce it at any time during its life. If the appellant would stay • its execution, it was incumbent upon him to give such an undertaking as the statute requires, and he assumed *490the burden of a compliance with the statute. If he omitted to take such steps as would constitute a compliance, it was his fault, rather than that of Chielovieh.
The motion for a writ is denied, and the temporary restraining order heretofore made herein is discharged.
Paterson, J., and Garoutte, J., concurred.