Morgan, J.
This is an appeal from an order and judgment granting a peremptory writ of mandamus commanding the defendant to issue a warrant -to the relator for the sum of $635.81, claimed *23by the relator as due to him as his salary as county superintendent of schools of McIntosh county. The facts as recited in the affidavit on which the alternative writ of mandamus was issued, are the following, viz.: That the relator had been the duly elected and acting superintendent of schools of McIntosh county from the year 1897 until January, 1901; that the defendant was in January, 1901, and for two years prior thereto had been, the duly elected and acting auditor of said county; that during the school years ending June 30, 1899 and 1900, respectively, the actual number of schools held in said county, and .over which relator had supervision, was 78 in 1899 and 83 in 1900; that the relator, as superintendent of schools, filed with the county auditor and county commissioners of said county the receipt of the superintendent of public instruction, showing that all reports required to be filed in said superintendent of public instruction’s office had been duly rendered to said superintendent of public instruction and filed in the office of the relator, and that relator had filed, as such county superintendent, his certificate and report showing the actual number of schools over which he (the relator) had actual supervision during the school years commencing June 30, 1899, and June 30, 1900; that said defendant refused, after demand, to issue ito the relator a warrant for the salary due him as such superintendent of schools for the months of June, July, August, September, October, November, and December of the year 1900, amounting in the aggregate to the sum of $688.33. Upon such affidavit an alternative writ of mandamus was issued, embodying the same allegations contained in the affidavit, and served on the defendant. The aftternaltive writ ordered the defendant to show cause and make due return to said writ at Wahpeton on January 30, 1901. At such time and place the defendant made answer to said writ, and in said answer the following allegations were made in. detail: A denial that the number of schools in said county over which relator had supervision in- 1899 was 78, as claimed by him, and not more or greater than 69, and for 1900 not 83. as claimed by relator, and was not more than 69. A denial that relator filed any report with defendant showing the actual number of schools over which he had supervision, and a denial that defendant refused to issue a warrant to relator for his salary for the months named in the alternative writ, and a denial that there is any salary due him for said months. The answer further alleged that during the school year ending June 30, 1898, the relator’s salary was paid, after having been allowed by the county commissioners upon bills presented by relator to that board, and duly verified by the oath of relator, to the effect that they were just and true; that thereafter, and up to the month of May, 1900, the relator demanded and received his salary from the defendant for the amount that relator claimed that he was entitled to. The answer contains a further allegation in the following words: “That in June, 1900, having reason to believe that the warrants by him issued to said relator, each in the sums last above *24mentioned, were considerably in excess of the amount actually accruing to him, made a report to the board of county commissioners of said county to that effect, and referred the matter to said board for determination at his semi-annual settlement therewith, during its July session for 1900. That said board, accordingly, in session, after a full hearing in the premises, at which said relator appeared in person and presented the grounds of his said claim to payment at said rate, gave its decision upon the evidence before it, finding that said relator had been overpaid as county superintendent since July x, 1897, for the first year $160; for the second year, $160; and for the last preceding year up to April 30, 1900, $75; * * * and ordered that no more warrants be issued by this defendant, as county auditor», to said George C. Wiles, as compensation or salary as county superintendent, until there shall have been accrued to him by virtue of said office a sufficient sum to satisfy the amount of such overpayment. * * * That, deeming himself bound to obey the order of the board as aforesaid, defendant has since refused to issue warrants to the amount aforesaid for salary accruing to said relator from and after May 31, 1900, which being rated and determined as hereinafter stated, covered tlie salary so accruing to him for the months of June, July, August, • September and part of October, 1900.” Other facts are stated in the answer, which need not be recijed, as these are, in our judgment, sufficient for a correct determination of the rights of the parties to the litigation. Upon the hearing the relator filed a paper called1 a “waiver,” in which he disclaimed all rights to the sum of $52.52; being the difference between the amount claimed by h'im in his affidavit and the amount that would have been due relator, without off-setting the sum of $395 overpayments of salary made to the Relator during the time between 1897 and May, 1900. The district court decided, as a matter of law, that a peremptory writ should issue upon the allegations of the pleadings without proof. From the order and judgment awarding the peremptory writ the defendant has appealed to this court, and has duly assigned errors based upon the action of the trial court in granting the writ, both upon questions of law and of fact.
The respondent moves to dismiss the appeal upon the groxtnd, as alleged, that the mandate of the peremptory writ has been fully complied with, and that in consequence thereof there is no practical issue to be determined on the appeal. The facts on which this motion is based are: That a warrant for $395 was issued by the defendant and delivered to the relator ¡mediately after the peremptory writ had been served on the defendant, and a demand for the warrant had been made on him by the relator. The service of the writ and the demand were made about 4 o’clock in the afternoon of February 20, 1901. The defendant objected to issuing the warrant then for the reason that he desired to consult with the state’s attorney, who had then departed for his home, some six miles distant. The relator insisted on having the warrant then and there delivered to him, and threatened that, unless delivered, he would proceed *25against him for refusing to obey the order of the court, by having him arrested for contempt pf court, and that, if he left that room without the warrant, it would be too late for him to save himself from the penalties following a refusal to obey the order of the court, thereafter. That fearing such arrest and imprisonment, and .being ignorant of his rights under the circumstances, he issued the warrant for $395. Such are the circumstances under which the warrant was delivered to the relator, substantially as narrated in •defendant’s affidavit in opposition to the motion to dismiss the appeal. The relator contends that this was a voluntary compliance with the writ. The defendant contends that it was a compliance under duress, and, as such, not voluntary. We are not called upon to determine the effect of the threats made by the plaintiff upon the defendant, as it is clear to us that the motion should be denied xtpon another ground.
The writ commanded that the auditor issue a warrant for $635.81, without specifying any items comprising such sum. This sum was described as “salary.” The auditor issued a warrant for $395 only. This left the writ uncomplied with to the extent of $240.81. The mandate is still unsatisfied, and to that extent, at least, remains as a command to be obeyed by the defendant if the judgment is affirmed. The disposition of this sum still remains to be made, and the fact that no issue was made concerning payment of this sum is immaterial, as the issues may be changed when reached for final adjudication, in view of the issuance of the warrant for $395. The nature of this order, however, is such that a compliance with it would not necessarily be considered as an abandonment of the right of appeal. Payment of an enforceable judgment is not of itself deemed,in all cases such a compliance with the judgment as to deprive a defendant of his appeal. Unconditional payment of a judgment by the person against whom it is rendered, and an unconditional acceptance of such payment by the person in whose favor it is rendered, are radically different, as affecting the -right to appeal. Accepting the benefits of a judgment, and an appeal therefrom thereafter, are acts inconsistent with each other. The unconditional payment and compliance with a judgment are not always matters of choice, and are therefore not always deemed voluntary, as a matter of law. Payment or compliance may be exacted by execution pr commitment, and are therefore deemed involuntary. Payment or compliance as a matter of compromise, or under some special arrangement by which an appeal is agreed to be waived would be voluntary. But when made without conditions, and to avoid the enforcement of the judgment by due process of law, an appeal is not thereby barred. Because a person does not wish to risk the sacrifice of his property by forced sale, or does not wish to risk suffering the penalty of even temporary refusal to comply with the judgment, in cases where the giving of a supersedeas bond is inconvenient or impossible, or an immediate appeal cannot be taken, does not indicate a voluntary compliance with the *26judgment; and a denial of an appeal in such cases would often result in injustice and oppression. “It is said that, after making the deed which the court ordered, the appellant is bound by it, and cannot now prosecute this appeal. The principle is unsound. The deed recites on its face that it is made under the order of the court.” O’Hara v. McConnell, 93 U. S. 150, 23 L. Ed. 840. “In no instance within our knowledge has an appeal or a writ of error been dismissed on the assumption that a release of errors was implied from the facts that money or property had changed hands by force of the judgment or decree. If this judgment is -reversed, it is the duty of the court to restore the parties to their rights. Erwin v. Lowry, 7 How. 184, 12 L. Ed. 660. See, also, Martin v. Johnson, 128 N. Y. 605, 27 N. E. Rep. 1017; Grim v. Semple, 39 Iowa, 570.
The cases holding that a compliance with the mandates of the peremptory writ justifies a dismissal of an attempted appeal proceed upon the theory that the acts ordered to be performed, and actually performed pursuant to the writ, are such that a reversal of the judgment granting the writ would have no effect upon the act performed. If a reversal of the judgment in this case would not and could not have any effect upon the rights of the parties, so far as-the issue of the $395 warrant is concerned, then the principle laid down in the following cases would be applicable: In re Kaeppler, 7 N. D. 307, 75 N. W. Rep. 253; Leet v. Board (Cal.) 47 Pac. Rep. 595; Foster v. Smith, Id. 591; San Diego School Dist. of San Diego Co. v. Board of Sup’rs of San Diego Co., 97 Cal. 438, 32 Pac. Rep. 517; In re Manning, 139 N. Y. 446, 34 N. E. Rep. 931; People v. Common Council of City of Troy, 82 N. Y. 575. But we do not understand that the action of the county auditor in delivering the warrant to the relator gave him such rights to the warrant, or to the money received thereunder, as to render him not liable to account therefor, in a proper action, in case it is judicially determined that he was not lawfully entitled thereto. In such event he may be compelled to restore the property received, or to account therefor. Hiler v. Hiler, 35 Ohio St. 645; Chapman v. Sutton, 68 Wis. 657, 32 N. W. Rep. 683; Richeson v. Ryan, 56 Am. Dec. 493. Under the evidence the issuing of the warrant to the respondent did not necessarily finally determine the rights of the parties in relation thereto. It follows that a practical issue remains unsettled' as the record now stands, and the motion to dismiss the appeal is therefore denied.
The remaining question is, did the facts ds stated in the answer, taken to be true, justify the county auditor in refusing to issue a warrant to the relator for the amount lastly claimed by him as due him for salary? In other words, are the provisions of the statute conferring upon the auditor the power to issue warrants for salaries to county officers mandatory upon him, or is he vested thereunder with any discretion in relation to that matter Section 652, Rev. Codes 1899, relating to salary of county superintendents, provides, “And the same shall be paid out of the county general fund monthly *27upon the warrant of the county auditor.” Section 1919 provides, “Warrants for salary of county officers may be drawn by the county auditor from time to time as such salaries become due and payable.” It is claimed by the defendant in his answer that the relator had, during his said term of office, drawn more money from the county treasury, by reason of having wrongfully collected salary based on a claim that there were more schools in the county, than there were in fact; in other words, that the relator had made false reports and claims, and drawn salary based on such false claims or demands; that the auditor discovered the fact of such overclaims and over-payments, and reported the fact to the county commissioners; that they investigated the facts, and-found them to be as reported by the auditor, and ordered him to issue no more warrants until the accrued salary should equal the amount of such overpayments, $395; and that he refused to issue warrants between May and October, 1900, for the reason that he was so ordered. The basis of his refusal in reality is, as claimed by him, that no salary was due the relator; that he' had been fully paid before said time; and that he was ordered not to deliver to relator any more warrants. The sufficiency of this answer is the sole question to be determined by us. In ordinary cases of salaries fixed by law, and not paid, and actually due, it is not denied that the absolute duty to issue warrants therefor devolves upon the auditor, under the statute, and that he is not bound to submit to the directions of the county commissioners, or any one else to withhold the issuing of such wararnts. In such cases he has no discretion. The law will compel him, by mandamus, to issue warrants for such salaries. In those cases his acts are ministerial, merely, no doubts existing and no facts apeparing as to the validity or payment of the salary, the law favors prompt payment of the salary to officials, that they may fulfill their personal obligations by payment. In this case there is no contention that the salary is not due and payable, unless the fact as claimed, that there has been an overpayment of $395, is to be considered. The commissioners found that the relator had overdrawn his salary to that extent. The question of the county superintendent’s salary, so far as auditing the same is concerned, pertained to the duties of the auditor, and not to the duties of the county commissioners. However, the county commissioners are intrusted with the management of the fiscal affairs of the county. They investigated the matter of the sum due the couny superintendent for salary, and what sum was overpaid. So far ás concerns this investigation of moneys paid to, or overpaid to, the superintendent, or any county officer, the general powers conferred upon the board by the statute would seem to be broad enough to authorize such investigation, and make it a duty incumbent upon them to do so. The board has power to institute and prosecute actions on behalf of the county, and to make all orders respecting the property of the county; to audit the accounts of all officers having the care or disbursement of the county’s money. Sections *281905, 1906, Rev. Codes 1899. The board having made such investigation, the result was communicated to the auditor. Whether the board had ample statutory authority to conduct such investigation or not is not material in this case. It resulted in bringing to the auditor’s attention the fact that it was claimed' that the county superintendent had overdrawn his salary, and was indebted to the county by reason of such overpayment. Had the same information been ¡Drought to the auditor from any other source, the conclusion would'be the same. In fact, he was advised in_some way of such overpayment before the matter was brought to the board’s attention. In view of such knowledge, confirmed by an order from the commissioners not to pay the relator’s salary until the overpayment had been wiped out by accrued salary, was it the duty of the auditor to issue his warrant, under these circumstances? We think not. He is the agent of the county, intrusted with the duty of careful performance of all acts devolving upon him. To deliver a warrant to the relator when it appeared that there was reasonable ground to believe tliat none was due him, and that he had been paid for the services for which he asked the warrant, would have been acting contrary to.the interests of the county. Was the relator entitled to a writ of mandamus against the auditor, under the facts alleged in the answer? The writ will issue to compel payment of salaries of public officers, when fixed by law, and when due and payable. Such is the general rule. Smith v. Dunn, 64 Cal. 164, 28 Pac. Rep. 232; State v. Hickman, 9 Mont. 370, 23 Pac. Rep. 740, 8 L. R. A. 403; State v. Hastings, 15 Wis. 83. If the allegations of the answer be true, there was not anything due to the relator for salary. He had been paid, not that identical salary, but what was its equivalent. The writ of mandamus will not be issued, except in cases where the right to it is clearly shown. In cases of doubt, based on reasonable grounds arising from existing facts, it will not issue. It is not issued as ,a matter of strict legal right in all cases. If the auditor was vested with any discretion under the circumstances, in regard to issuing the warrant, mandamus was not the proper remedy. If the duty was purely a ministerial one, the writ should issue. In view of the facts brought to his notice, we think it was his duty to refuse the warrant to the same extent as though it was his individual affair. As auditor, he is the representative of the county, and is trustee of its interests. No different rule should apply in cases of issuing warrants by auditors and paying them by treasurers. Rspecting the duty of treasurers the supreme court of Illinois has said: “Hence, as a general rule, mandamus will lie to compel a county treasurer or other disbursing officer to pay an order legally drawn upon funds in his hands subject to the payment of such order. * * * But where, in such case, by reason of a complication of extraneous circumstances not specifically provided for by statute, a well-founded doubt arises either as to the right of the applicant to receive the fund, or the duty of the officer to pay it out, mandamus *29is not the proper remedy. The right in such case being doubtful, the claimant must resort to some other appropriate remedy to determine it.” People v. Johnson, 100 Ill. 537, 39 Am. Rep. 63. The supreme court of Nebraska said in State v. Cook, 43 Neb. 318, 61 N. W. Rep. 693: “He [treasurer] acts only under the authority given by the council acting in accordance with law, when he makes pay-, ment. Without such authority a payment by him would be wrongful, and subject him to personal liability. We cannot, in an application for a mandamus against him, undertake to try the disputed claims of the relator and the bondholders. The bondholders are not parties to the suit, and the city is not a party. The relator has not shown a clear legal right.” In Evans v. Bradley, 4 S. D. 83, 55 N. W. Rep. 721, it was said: “It is the duty of the county treasurer, under ordinary circumstances, to pay warrants drawn according to law by the board of county commissioners, when he has funds in his hands for that purpose. If however, he has reasonable grounds to question the legality of the warrant, or the power of the county commissioners to draw the same, he is justified in refusing to pay such warrant until the validity of the same is established by the judgment of a court of competent jurisdiction. ” If the matter of issuing warrants for salaries were under the direction of the county commissioners in this case, it would have been their duty to refuse its issuance; and the auditor, as the agent of the county, had the right to interpose the same defense. Under the facts as alleged, and to be taken as true until overthrown by proof, the auditor was under no legal duty to issue the warrant; and, in the absense of such legal duty, mandamus could not confer the legal authority upon him to do so. The law confers the duty to do the act. The duty pre-exists, and the writ compels its performance. Under the facts as pleaded, the auditor had a discretion to exercise as to his official actions, and mandamus will not lie to cause him to act when he is vested with such discretion. Oliver v. Wilson, 8 N. D. 590, 80 N. W. Rep. 757, 73 Am. St. Rep, 784, and cases there cited; Territory v. Woodbury, 1 N. D. 85, 44 N. W. Rep. 1077.
The answer, as set forth herein, alleges facts which, if true, show that the relator had drawn money from the county to which he was not then entitled, that he has receivd compensation as superintendent of schools upon a basis of more schools than were actually kept m that county at that time, and that in consequence of such fact he was overpaid his salary, caused by the relator’s misrepresentations of the facts. It is claimed by the relator that such facts, even if true, afford no ground for the defendant’s refusal to< issue his warrant for the amount of the salary accrued; that such overpayment, even if made, is a matter to be adjudicated in a proceeding or action between the relator and the county; that the auditor should have issued the warrant, and if it was an overpayment, and known to be such by the auditor, he should nevertheless not interpose any objection, as the matter involved moneys due to the county, over which *30the auditor had no official duty to perform. We cannot acquiesce in this reasoning. The effect of it is to make the auditor in such cases a mere machine, without power or authority to protect the county’s interests from any demands, although known by him not to be valid. In a suit between the relator and the auditor, as individuals, involving similar overpayments, the right of the auditor to recover such overpayments would not be questioned. Having been made under reliance on false representations, no question of voluntary payment could be successfully raised. In a similar suit between the relator and the county, such overpayments, so induced, could be recovered back or off-set against accrued demands of the relator. There existing no power to overpay the salary, the fact that it was done had' no binding force, and it could be recovered back. Adams Co. v. Hunter, (Iowa) 43 N. W. Rep. 208, 6 L. R. A. 615; Sheibley v. Dixon Co., (Neb.) 85 N. W. Rep. 398; U. S. v. Burchard, 125 U. S. 176, 8 Sup. Ct. Rep. 832, 31 L. Ed. 662; Lumber Co. v, McIntyre, (Wis.) 75 N. W. Rep. 964, 970, 69 Am. St. Rep. 915. In Bogan v. Holder, (Miss.) 24 South. Rep. 695, it is said, in a case very much in point with the case at bar: “Was the auditor authorized to withhold in his next settlement with the assessor the amount erroneously overpaid in the settlement for the preceding year ? Or, to state it more accurately, should the petitioner be allowed in this mandamus proceeding to recover from the state the amount withheld by the auditor on account of the former overpayment, when he has already received from the state the full amount to which the law entitles him? May he compel the state to pay him for the year 1897 the full sum of $300, when he is the debtor to the state for the sum demanded, by reason of the overpayment for the year 1896? * * * It is said, ‘Let the state bring suit against the assessor, if he has its money.’ True the state might do that; but why grant a mandamus to compel the state to pay, when it clearly appears that the assessor is indebted to the state in exactly the sum sought to be recovered in the mandamus proceeding? The writ of mandamus is not strictly one of right. Our Code has assimilated the action of mandamus to other ordinary actions but the courts may still grant or deny the writ according to the circumstances of the case. See, also, Weeks v. Town of Texarkana, (Ark.) 6 S. W. Rep. 504; City of Tacoma v. Lillis, (Wash.) 31 Pac. Rep. 321, 18 L. R. A. 372.
(88 N. W. Rep. 729.)
Our conclusion is that the auditor showed facts in his answer entitling him to have the alternative writ of mandamus dismissed. Such a dismissal of the writ would have deprived him of nothing in the way of actual compensation due him, as he had an adequate and speedy remedy against the county by an ordinary action.
The order and judgment awarding the peremptory writ of mandamus are reversed, and the district court is directed to dismiss the proceeding.
All concur.