Fisk, J.
This litigation arose in the district court of Ward county; the object of the action being to foreclose a chattel mortgage executed and delivered by the defendants Eliza, Jess and Daniel Show to the defendant Bradley, and by him sold and assigned, together with the notes secured thereby, to the First National Bank of Flaxton, said mortgage and notes having thereafter been sold and assigned to the plaintiff. At the time the defendant Bradley sold and assigned said mortgage and notes, he indorsed ■the notes upon the back as follows: “By agreement with recourse-after all security has been exhausted, waiving protest. E. R. Bradley.” The complaint prays a foreclosure of the mortgage and sale of the mortgage chattels, and for a deficiency judgment against the Shows and Bradley, should a deficiency exist after the application of the proceeds of the sale. The district court rendered judgment in plaintiff’s favor as prayed for; such judgment providing for a sale of the mortgaged chattels, and, in case of a deficiency after such sale, that plaintiff have execution against the Shows for the amount of such deficiency, and, further (and this-is the important provision so far as this appeal is concerned), that if the plaintiff is not able to collect the amount of such deficiency from the defendants the Shows, who, as above stated, are the mortgagors, then that plaintiff have execution against the property of the said Bradley therefor. Other provisions are contained in the judgment relative to the rights of Bradley to recover remuneration from the Shows for any sum collected from him under such judgment, but these provisions are not material to a decision of this appeal. The defendant Bradley is the sole appellant, and he asks for a trial de novo of the entire case under the provisions of section 7229, Rev. Codes 1905.
*309Appellant advances three reasons why the judgment appealed from should be reversed; but, as we consider his first reason decis^ ive of the case, it will be unnecessary for us to notice his other points. His first contention is that no cause of action had accrued against the appellant, nor conld any cause of action accrue against him under the contract of indorsement until all the security under the mortgage had been exhausted, and, hence, that the complaint fails to state a cause of action as against him. That this contention is sound we have no doubt whatever. His contract of indorsement of the notes in question is the measure of his liability. Under this contract, he obligated himself to pay only after all security has been exhausted. No recourse was to be had to him until after such security is first exhausted. This is plain from a reading of the indorsement. Such a contract is in effect, as contended for by appellant, “a guaranty of collection out of the mortgaged securities,” and such contract imposes upon appellant the same liability as though he had merely guaranteed the collection of these notes out of the mortgaged securities. The respondent, as well as the trial court, evidently proceeded upon the erroneous theory that such contract of indorsement amounted to an unconditional guaranty of payment, as under no other theory could appellant be held liable in this action. There is, of course, a wide distinction between a guaranty of payment and one of collection, and such ■distinction is clearly pointed out by the court of appeals of New York in McMurray v. Noyes, 72 N. Y. 523, 28 Am. Rep. 180, as follows: “The fundamental distinction between a guaranty of payment and one of collection is that, in the first case, the guarantor undertakes unconditionally that the debtor will pay, and the creditor may, upon default, proceed directly against the guarantor without taking any step to collect of the principal debtor, and the omission or neglect to proceed against him is not (except under special circumstances) any defense to the guarantor; while, in the second case, the undertaking is that, if the demand cannot be collected by legal proceedings, the guarantor will pay, and consequently legal proceedings against the principal debtor and a failure to collect of him by those means are conditions precedent to the liability of the guarantor, and to these the law, as established by numerous decisions, attaches the further condition that due diligence be exercised by the creditor in enforcing his legal remedies against the debtor.” Some courts have held that in case of a guaranty *310of payment the guarantor may be sued jointly with the principal debtor or separately; but his liability does not depend upon any condition, as in the case of a guaranty of collection. In the latter case the rule, as established by the authorities, is that the liability of the guarantor is conditioned upon the exhausting by the creditor of all his remedies against the principal debtor. McMurray v. Noyes, supra; Bosman v. Akeley, 39 Mich. 710, 33 Am. Rep. 447. The Supreme Court of this state, in Roberts v. Laughlin, 4 N. D. 167, 59 N. W. 967, established the rule that the failure to first pursue the principal debtor is excused where it appears that a suit would be fruitless. To the same effect are the decisions in Colby v. Farwell, 51 Atl. 254, 71 N. H. 83; Crane v. Wheeler, 50 N. W. 1033, 48 Minn. 207. The rule has been embodied in statutory form in this state. See sections 6082-6083, Rev. Codes 1905.
Authorities are numerous holding to the effect that no 'cause of action accrues against the guarantor of collection until after the creditor has exhausted his remedies against the principal debtor; hut we will content ourselves by a reference to only a few of them. In Borden v. Gilbert, 13 Wis. 670, Mr. Justice Cole, in speaking for the court, in an action similar to the case at bar, said: “The plain, obvious import of the guarantor’s contract is that he will pay the debt, provided, on due diligence, it cannot be collected out of the mortgagor, or made out of the security. It is not an absolute promise to pay in the first instance. The respondent should exhaust his remedy against.the mortgagor and the mortgaged property before he can call upon the guarantor to make good his contract. The former are the primary resources to which he must look for the payment of his debt. If they fail or prove inadequate then the guarantor becomes liable. It was therefore improper and erroneous to make the guarantor a party to this suit, and to take a personal judgment against him, under the allegations of the complaint.” In Dewey v. Clark, 50 N. W. 1032, 48 Minn. 130, 31 Am. St. Rep. 623, it was said: “But, without deciding what the rule is where the mortgage security was given by the debtor directly to the creditor and not furnished by the guarantor, we think that, upon both principle and authority, it must be held that where a party holding a note secured by mortgage sells the note, guaranteeing its collection, and at the same time, and as a part of the same transaction, assigns the mortgage, thereby furnishing the purchaser the means of obtaining payment, in whole or in part, the *311plain import of the guarantor’s contract is that he will pay the debt, provided, on due diligence, it cannot be collected out of the debtor or out of the mortgage. Construed in the light of the facts, this must have been the understanding of the parties. A person guaranteeing such a debt, and assigning the mortgage with it, must have contemplated a collection by means of the mortgage, and that he would not be looked to until the creditor had resorted to that, if available. * * * Cases of sureties and guaranties of payment are, of course, not in point.” To the same effect are the cases of Brainard v. Reynolds, 36 Vt. 614; Cottrell v. New London Furniture Co., 68 N. W. 874, 94 Wis. 176; Bouche v. Louttit, 104 Cal. 230, 37 Pac. 902. In the latter case it was held that the action was prematurely brought, for the reason that the guaranty was to pay the deficiency, and there was none until the foreclosure sale, which took place subsequent to the commencement of the action. Likewise, in the Wisconsin case last above cited, it was held, for similar reasons, that the guarantors of the collection of the debt were not proper parties to an action to foreclose the mortgage. See, also, 20 Cyc. 1447, 1448, and cases cited.
It goes without saying that a person cannot be rightfully sued until a cause of action accrues against him, and, applying this elementary principle to the case at bar, it necessarily follows that the complaint fails to state a cause of action against appellant, because, at the time the action was commenced against him, no attempt had been made by plaintiff to exhaust the security covered by the mortgage. The argument of respondent’s counsel that appellant did not challenge the sufficiency of the complaint in the court below has no force, as it is well settled that this may be done in the Supreme Court for the first time. Nor is it any answer to appellant’s contention that the rights of appellant were safeguarded by the judgment. No cause of action existed against him at the time the action was brought, his liability being a mere contingent liability, and, such contingency not having arisen, no action could be commenced nor judgment recovered against him. As aptly stated by appellant’s counsel: “Reduced to its last analysis, the plaintiff’s case, as disclosed by the complaint and the judgment, is in this situation: At the commencement of this action the plaintiff held the appellant’s contract, by which the latter had assumed a liability contingent upon the happening of a certain event, to wit, the sale of the mortgaged property, and the insufficiency of the *312proceeds to satisfy the mortgage debt. Without the happening of such contingency, the plaintiff commenced this action against the principal debtor and the guarantor, and prosecuted it to judgment. At the time of giving judgment the contingency had not yet accrued. The court says, in effect: “There is nothing due upon this contract now. The plaintiff has not exhausted the security, and, when he does, there may be no deficiency for the defendant to pay. But, since the parties are in court, I will direct the sheriff to perform plaintiff’s contract for him, to wit, to diligently pursue and exhaust the security and in conjunction with the plaintiff, who has entire control over the execution, to determine when that has been done, and whether a deficiency remains for the defendant to pay. I will constitute the plaintiff the judge of all further proceedings in this case, and, when he and the sheriff are satisfied that they have performed the conditions precedent to this contract, if they are then of opinion that the guarantor is indebted to plaintiff, the latter may, at his own instance, and without any application to the court, have a general execution against the guarantor. If, then, the guarantor is not satisfied with the decision of the plaintiff and the sheriff, he may, by such appropriate proceedings as the law gives him, if any are provided, bring the matter before the courts for review.’ Is it not clear that the guarantor cannot by any possible process of reasoning be considered a proper party to this suit ? To adjudge his rights, the court must not only determine whether the plaintiff has exhausted the security, and whether a deficiency remains, but it must further say whether he has pursued his remedies against the securities with due diligence and in good faith. Necessarily this cannot be done where the guarantor is sued before the security is resorted to, and it is left for the plaintiff after the decree to perform those conditions precedent to this contract.”
112 N. W. 1062.
It follows that the judgment appealed from, in so far as the appellant is concerned, must be reversed and the action dismissed; and it is so ordered, with costs to appellant.
All concur.