This is an appeal from an order of the district court of *71 Cаss county vacating an injunction issued pursuant to § 8074, Comp. Laws 1913.
Defendant Jacobson bad a second mortgage on real estate. Plaintiff bought this real estate subject to defendant’s mortgagе. On June 4th, 1925, Jacobson began foreclosure of his mortgage by advertisement, the sale being set for July 14th, 1925. The amount claimed to be due at date of sale was $6,854.77. On June 30th Larson applied to Judge Cole, one of the judges of the first judicial district, for an order enjoining the foreclosure by advertisement and directing that all further proceedings be had by action in the district court. Larson set out аs grounds for this order: First, that the defendant had not complied with the statutory requirement as to the giving of thirty days’ notice of intention to foreclose; Second, that he had a counterclaim against and a partial defense to the collection of the mortgage debt. Judge Cole issued the order. Thereafter Jacobson procured an order directed to Larson requiring him to show cause why the injunctional order should not be vacated. Jacobson made a showing by affidavit in support of this order to show cause setting out that the statutory notice of intention to forеclose had been given as required and conceding the partial defense and counterclaim to the collection of the mortgage debt, claimed by Larson. On the return day both parties appeared. No objection was offered to a consideration of the matter by the district court, and after hearing, the injunctional order was vacated and the defendant was permitted to proceed with his foreclosure by advertisement for the amount of the mortgage debt less the amount claimed by Larson as a counterclaim and defense. Thereаfter, and on July 13th, 1925, Larson applied to Judge Englert, also a judge of the first judicial district, for an order enjoining the foreclosure. In his supporting affidavit he again set out that no notice of intention tо foreclose had been given as required by the statute, and also set out that he had further counterclaims and defenses to the extent of $600. He did not advise Judge Englert of the prior appliсation and the proceedings thereafter had before Judge Cole. Judge Englert granted the injunctional order as prayed. Thereafter, and on July 14th this order was served upon the defendant and the sheriff charged with the duty of making the sale. Jacobson at once applied to Judge Cole for an order vacating the order made by Judge Englert. He did this with Judge Englert’s consent, *72 -having advised Judge Englеrt of the prior proceeding before Judge Cole. In his application to Judge Cole for a vacation of Judge Eng-lert’s order, defendant again set up facts tending to show that the notice of intention to foreclose had been given as required by the statute, and admitted the further counterclaim and defense to the extent 'of $600 as claimed by Larson in his affidavit and appliсation to Judge Englert. Whereupon Judge Cole vacated the order issued by Judge Englert, on condition that the amount of the defendant’s mortgage claim be reduced to $3,900 and interest, thus taking into account and allowing all of the alleged counterclaims and defenses of Larson against the collection of the mortgage debt.. This appeal is from the order of Judge Cole thus issued.
Section 8074, Comp. Laws 1913 reads as follows:
. - “Whеn the mortgagee or his assignee has commenced proceedings for thé foreclosure of a mortgage by advertisement and it shall be made to appear by the affidavit of the mоrtgagor, his agent or attorney to the satisfaction of a judge of the district court of the county where the mortgaged property is situated, that the mortgagor has a legal counterclаim or any other valid defense against the collection of the whole or any part of the amount claimed to be due on such mortgage, such judge may by an order to that effect enjoin the mortgagee or his assignee from foreclosing such mortgage by advertisement and direct that all further proceedings for the foreclosure be had in the district court properly having jurisdiction of the subject matter; and for the purpose of carrying out the provisions of this section service may be had upon the attorney or agent of the mortgagee or assignee.”
This section contemplates that the order therein provided for shall be made on ex parte application. Beiseker v. Svendsgaard,
In tbe instant case tbe plaintiff relied upon two grounds as entitling bim to tbe injunetional order. First: That tbe defendant bad not complied witb tbe statute, chapter 66, Sess. Laws 1921, requiring the giving of notice of intention to foreclose and, second, that be bad defenses and counterclaims against tbe collection of tbe mortgage debt or a part thereof. Reference to § 8074, supra, discloses that a mortgagor is entitled to tbe injunetional order when it appears that be “has a legal counterclaim or any other valid defense against tbе collection of tbe whole or any part of tbe amount claimed to be due on such mortgage.” Tbe notice of intention to foreclose required to be given by chapter 66, supra, does not affect in any manner tbe debt secured by tbe mortgage sought to be foreclosed. It is merely a prerequisite to tbe foreclosure of tbe mortgage. It applies as well whether such foreclosure is by advertisement or by action. Its purpose is to advise tbe mortgagor of tbe contemplated foreclosure to tbe end that be may make payment or сure tbe default and thus save tbe costs and trouble incident to foreclosure. See Brewer v. Forsberg,
When tbe defеndant Jacobson applied to tbe district court for an order vacating plaintiff’s injunetional order be admitted tbe counterclaim and partial defense claimed by tbe plaintiff and signifiеd his willingness to have tbe mortgage debt, for which be was foreclosing, reduced to tbe extent of that claim. Thus tbe situation presented to *74 Judge Cole was one where all the facts were admittеd. The defendant was foreclosing by advertisement. The plaintiff admitted the execution of the mortgage and the mortgage debt. There was no dispute as to the plaintiff being in default. He did claim, however, that he had a counterclaim and defense which would reduce the mortgage debt, but he did not tender or offer to pay the excess. Defendant admitted this claim of the plaintiff and asked that the foreclosure be permitted to go forward for the excess of his debt over such claim. The district judge in the exercise of his discretion vacated the injunctional order upon the express condition that the foreclosure be only for the undisputed excess. In the face of defendant’s admission there was nothing to litigate. The plaintiff could gain nothing except delay through compelling the foreclosure by action. On the other hand the defendant would be deprived of a valuable contract right, that is, the right to foreclose by advertisement. Considering the purpose of the statute here involved we are of the opinion that there was no abuse of discretion on the part of the district, judge in dissolving the injunctional order. To hold otherwise wоuld be to hold that his discretion was exhausted once he had exercised it and issued the order.. We do not think that this was the legislative intent in enacting the statute. . We are further confirmed in this opinion by the fact that § 7841, Comp. Laws 1913 (Sess. Laws 1907, chap. 79), provides that an appeal may be taken to this court:
“(3) When an order . . . grants, refuses, modifies or dissolves an injunction or refuses to modify or dissolve аn injunction, whether such injunction was issued in an action or special proceeding or pursuant to the provision's of § 8074 of this code. . . .”
This statute plainly contemplates that a district judge may mоdify, continue or dissolve such an injunction or refuse to do so as well as grant or refuse to grant the injunction in the first instance. In this connection see James River Lodge v. Campbell, 6 S. D. 157,
The order appealed from therefore will be and it is affirmed.
