*326The opinion of the court was delivered by
Brewer, J.:
The question in this case arises on the ruling of the district court sustaining demurrers to the third defense in the answer of Cannon and wife, the plaintiffs in error. The petition was an ordinary petition on a note and mortgage, alleging the execution of the note and mortgage to C. &VG. Cooper & Co., and an indorsement to plaintiff before maturity. The third defense in the answer alleged substantially that at the time of the execution of the note defendant N. B. Cannon executed a chattel mortgage on a portable sawmill situate in the same county as the land as additional security therefor, the filing of the mortgage, and that the same was “still held and owned by C. & G. Cooper & Co.” It also alleged that subsequently thereto Cannon sold and delivered said mill to George W. Spencer and Theodore Kreipe, who still have the possession thereof in the same county; that as part consideration therefor said purchasers agreed to pay this note; that thereafter said Spencer and Theodore Kreipe “made an arrangement with plaintiff to purchase the said note and foreclose the said mortgage for the benefit of the said Spencer and Kreipe;” that the plaintiff knew of the purchase of the mill by Spencer and Theodore Kreipe, and of their agreement to pay this note therefor. There was a prayer that said Spencer and Theodore Kreipe might be made parties, and brought into court, and that on decree the saw-mill be first sold to satisfy the note. To this defense plaintiff below, Conrad Kreipe, demurred. Spencer and Theodore Kreipe were made parties, and they also filed a demurrer to this third defense, in Cannon’s answer. Both demurrers were sustained. Was there error in this? The most that can be gathered from this defense is, that it alleges the existence of two securities, or funds, for the payment of this debt, with an equity in favor of the exhaustion of the other before touching the land; secondly, that it alleges a contract, for a valid consideration, by Spencer ’and Theodore *327Kreipe to pay this debt; and possibly a third matter, that plaintiff was not the real party in interest. So far as this last matter is concerned, if it were fully and distinctly stated, the error in sustaining a demurrer to it would have been immaterial, for the second defense, which was unchallenged by demurrer, contained the same allegation, and it was a matter inquired into on the trial. So far as the allegation of a contract by Spencer and Theodore Kreipe to pay this debt is concerned, though it might disclose a contract for the benefit of plaintiff, and which he could enforce if he desired, yet it cast no .obligation upon him to sue upon or pay any attention to it; nor did it release or affect the security of the mortgage on the land, or the primary liability of Cannon for the debt. There remains therefore only the first of the matters suggested. It is unquestionably true, that equity will ofttimes interfere to direct the order in which two funds or securities for the same indebtedness shall be exhausted; as for instance, where a mortgagor having mortgaged for the same debt several tracts, thereafter sells some of them without any stipulation as to the debt, equity will direct a sale in the inverse order of the alienation. So, where a portion of mortgaged premises is sold, and the purchaser as part of the consideration assumes the payment of the mortgage-debt, equity may direct the sale of the portion purchased before that unsold is offered. Yet in these cases it is necessary that it clearly appear that the rights and interests of third parties will in no manner be trenched upon or prejudiced by such order. But the allegation here is, that this chattel-mortgage was still held and owned by C. & G. Cooper & Co., not that it was held and owned by plaintiff, or by Spencer and Theodore Kreipe, in whose interest and for whose benefit plaintiff was charged to be acting. Now while the indorsement of a note carries with it ordinarily all the sureties therefor, yet this is not necessarily so, and may be changed by stipulation: Noyes v. White, 9 Kas., 640. Thus, Cooper & Co. may have held other indebtedness for which both the real estate and the chattel-mortgage were securities, and on the sale of the note to *328plaintiff may have given him the real-estate mortgage as security therefor and kept the chattel-mortgage to secure the unsold indebtedness. Or, if they held but the one note, they may have by express agreement withheld the chattel-mortgage from plaintiff. Whatever may have been the reason, the allegation is clear that Cooper .& Co. still held and owned it, and equally clear that plaintiff had purchased for himself or Spencer and Theodore Kreipe the note and mortgage sued upon. And it does not appear that the order asked would not trench upon the rights of Cooper & Co., but on the contrary it does appear that whatever rights and interests they had, and by the allegations they had some, would be materially affected thereby, in fact might be entirely destroyed. Hence it was not error to refuse to order the sale' of the saw-mill first, and the demurrer was properly sustained.
The judgment will be affirmed.
All the Justices concurring.