It is not necessary to determine whether, as defendant Bank argues, it, as mortgage creditor, had merely a lien on the monies which the Highway Commission was required to pay, Liverman v. R. R., 109 N.C. 52; or, as mortgage creditor, it was required to apply the monies so paid to reduce the debt secured by the mortgage, Bonner v. Styron, 113 N.C. 30. It is sufficient for the purpose of this appeal to note that the judgment fixing the compensation required the application of that sum to plaintiff’s debt. The trustee, representing the Bank as mortgage creditor, was a party to that proceeding. The provision requiring application to the debt was inserted by consent. That provision of the judgment cannot now be challenged.
The payment made by the Highway Commission was not a payment voluntarily made by the debtor. The taking of the land was over the protest of debtor and creditor. Compensation for the taking was enforced by judicial proceeding. Since the payment was not voluntary, the debtor had no right to direct how it should be used, nor did the creditor have that right. Paving Co. v. Speedways, 250 N.C. 358, 108 S.E. 2d 641; McSween v. Windham, 89 S.E. 500; Citizens & Southern Bank v. Armstrong, 95 S.E. 729; In re Cunningham’s Estate, 142 N.E. 740; 70 C.J.S. 256, 40 Am. Jur., 811. Since neither debtor nor creditor had a right to direct the manner in which the payment should be used, it became the duty of the court to direct application so as to accord with “intrinsic justice or the equity of the ease.” Power Co. v. Clay County, 213 N.C. 698, 197 S.E. 603; Stone Co. v. Rich, 160 N.C. 161, 75 S.E. 1077.
What is the intrinsic justice or equity of this case? The answer is to be found in the contract made in 1953 between plaintiff and Goodyear Mortgage Corporation. It then loaned plaintiff $7,400. The debt carried interest at the rate of i% per annum. It was then agreed that plaintiff might repay this lean with interest to accrue thereon in 300 equal consecutive monthly installments, the first install*414ment being payable 1 May 1953. These installments would, as paid, decrease the amount of the principal debt by the monthly reduction in accrued interest. The amount of $39.06, fixed as the monthly payment, was a mere mathematical computation of the amount neces-sarjr to make payment in the time agreed. The creditor had no right to shorten the time for payment unless the debtor defaulted.
The act of the Highway Commission in taking part of the mortgage security should not be permitted to impair the contractual rights and obligations of the parties further than necessary. Where there is foreclosure of a mortgage securing several notes, the law requires rateable application of the proceeds to all of the notes thereby secured. Demai v. Tart, 221 N.C. 106, 19 S.E. 2d 130; Bank v. Trust Co., 199 N.C. 582, 155 S.E. 261; Whitehead v. Morrill, 108 N.C. 65; Kitchin v. Grandy, 101 N.C. 86. The taking by the Highway Commission may, we think, be treated as a partial foreclosure. If plaintiff's diebt had been made payable in 300 notes, one due each month, the proceeds from any foreclosure would have to be applied proportionately on each note. We conceive of no reason which changes this rule merely because the debt is evidenced by a single note payable in installments rather than in separate notes.
The payments voluntarily made by plaintiff sufficed to discharge the installments due on and prior to 1 August 1958. She had voluntarily paid 64 installments, reducing the debt by the amount of principal included in each of these installments. By the contract (note and deedi of trust) she had the right to discharge the balance of the debt in 236 monthly installments. On 24 July 1958 there was an involuntary payment of $2,425 as directed by the decree of condemnation. No reason is suggested why this payment should diminish the time and reduce the number of installments fixed for plaintiff to pay when the loan was made. When the balance owing on 1 August 1958 is ascertained by deducting all payments, voluntary and involuntary, the amount of plaintiff’s debt as of that date is fixed. By contract she has 236 months in which to make payment of this principal. How much it is necessary for her to pay each month to discharge that sum, with the interest to accrue thereon, by 1 April 1978 is a mere matter of mathematical computation. The discharge of her debt by monthly payments in the amount so ascertained accords with the intent of the parties when the loan was made and is therefore the equity of this case.
Plaintiff had no right to demand that she be permitted to use any part of the security to pay interest to accrue many months in the future. Defendant had no right to insist on shortening the time *415fixed by contract for payment. The attempted foreclosure was properly enjoinedi because of the wrongful demands by defendants for excessive monthly payments.
The cause is remanded for computation of the amount to be paid monthly to discharge the debt not later than 1 April 1978. Plaintiff will be entitled to credit on the monthly payments so ascertained the $44 she paid 27 October 1958 and the $30 she paid 19 January 1959. She will be allowed a reasonable time after the computation has been made to pay the installments then due.
The cause is remanded to the Superior Court to modify and correct the judgment in accordance with this opinion.
Modified and affirmed.