The disposition of this case is much embarrassed by irregular practice and loose pleading. If the point had been made, the demurrers should have been overruled, on the ground that a demurrer will only lie to a whole pleading, or to the whole of a particular cause of action or defence. It cannot be directed to a portion only of a single cause of action or defence, for the manifest reason that a demurrer raises an issue of law upon which the court is to render judgment. Bass v. Upton, 1 Minn. 292, (408;) Daniels v. Bradley, 4 Minn. 105, (158;) Armstrong v. Hinds, 9 Minn. 341, (356.)
But we think the same result must be reached if we treat the part of the reply demurred to as intended as a separate and independent defence. The answer alleges that, at the time of the execution of the note sued on, the defendants, to secure the same, executed a mortgage to one Thompson, plaintiff’s assignor, and the original payee of the note; that subsequently they sold and conveyed the mortgaged premises to one Abbie Crossman, who, in consideration of such conveyance, and as part-payment of the purchase-money, assumed the payment of this note and mortgage. So far as appeared from the answer, the only interest plaintiff had in the premises was as security for the payment of this note. Upon such a state of facts, there is no difficulty in applying the doctrine of subrogation in favor of defendants in ease they had to pay the note, which, as between them and Crossman, the latter ought to have paid.
But, in the part of the reply demurred to, the plaintiff alleges that defendants sold to Thompson a second mortgage on the same premises, and the three notes secured thereby, executed by Crossman to the defendant Elizabeth to secure the balance of the purchase-money *461on the sale of the premises already referred to, — the said Elizabeth assigning the mortgage, and indorsing the notes in blank, in the usual course of business; that Thompson, for a valuable consideration, sold and assigned the notes and mortgage to plaintiff; that, when the first note fell due, both Grossman and defendant Elizabeth failing and neglecting to pay it, plaintiff foreclosed the second mortgage, and at the sale bid in the premises for $939.65, which was their full value; that the time for redemption has expired, and no redemption from this sale has been made; that both the defendants (who are husband and wife) and Crossman are, and were at the time of the sale of this mortgage to Thompson, insolvent; “that suits brought by plaintiff against Elizabeth Eoglesong and Abbie Crossman on the last two notes, secured by said mortgage, have been decided in favor of this plaintiff.” It might also be stated that it is alleged in the answer that plaintiff had notice of the assumption by Crossman of the payment of the note in suit at a date prior to that on which defendants sold the second mortgage to Thompson, and that this allegation is not put in issue in that part of the reply demurred to. We have made no reference to the allegations in the reply that the defendants, to induce Thompson to buy the second mortgage, represented that Crossman and Elizabeth Eoglesong were both rich, and would pay the notes promptly as they fell due; for the reason that, at least in the absence of any allegation of fraud, they are immaterial. The reply seems to have been drawn without any well-defined theory of the law applicable to the facts; and hence we find it conspicuously meagre as to matters which we would have supposed the pleader would have been most careful to allege in explicit terms. It sufficiently appears that the first of the three notes has never been paid except bythe sale of the mortgaged premises, under which plaintiff acquired title; but the reply nowhere contains any direct and express allegations that the last two notes have not been paid, or that steps were taken at their maturity to fix the liability of defendant Elizabeth, as indorser. But, as against a general demurrer, we think, taking the whole pleading together, it might reasonably be construed as alleging, by implication at least, that these notes are unpaid; and the last allegation of the reply, quoted above, may possibly be construed as meaning *462that defendant Elizabeth continues liable for their payment. If this be so, the determination of the case is without difficulty.
No court of equity would subrogate a party to the rights of a mortgagee under a first mortgage; when he also held a second mortgage, for the payment of which the party seeking the subrogation was liable, unless he paid both mortgages. To grant subrogation on any other terms would compel the mortgagee, in order to protect his second mortgage, to turn around and pay off the first mortgage to the very party who was legally bound to pay the second. But, assuming that defendant Elizabeth is no longer liable on these notes, we still think that defendants would not, upon the facts stated in the reply, be entitled to the right of subrogation. Had plaintiff himself taken from Crossman a second mortgage without the consent of the defendants, and with notice of the relations between them and her as to the payment of the first mortgage, a very different case would have been presented. But in the present case the defendants themselves took the second mortgage, and then sold it to one to whom they had previously, as'principal debtors, executed the first mortgage. This they did without any reference to or reservation of any supposed rights on their part arising out of the arrangement between them and Crossman regarding the payment of the first mortgage, to which the mortgagee was in nowise a party. By so doing, we think they must be taken to have assented that the assignee should hold both mortgages with his legal rights unaffected by any outside arrangement between themselves and Crossman. One of these rights would be that any money received from the mortgagor upon the first mortgage should be treated, not as a purchase of the mortgage, but as a payment, so as to enhance the value of his security on the second.. The right of subrogation does not depend on contract, but is merely a creature of equity, and rests wholly upon grounds of natural justice, and is never allowed where it would conflict with the legal or equitable rights of others.. To allow it under the facts stated in the reply would certainly conflict with plaintiff’s legal rights acquired under the second mortgage.
Order reversed.