delivered the opinion of the court.
The district court sustained a demurrer for want of facts sufficient to constitute a cause of action and dismissed a complaint which reads in part as follows:
“Y. That by deed No. 15, executed on the 20th of June, 1922, before the notary of this city Jacinto Tex'idor, and deed No. 12, executed on the 29th of June, 1922, before the notary of this city Miguel García González, the firm of Zalduondo Mier & Co. agreed with the American Colonial Bank, defendant, upon a loan for the sum of twenty thousand dollars ($20,000.00). Said debt was recognized by means of an obligation written in English, which was made a part of said deed No. 15, executed before notary Jacinto Te-xidor on the 20th of June, 1922.
“And in order to .secure the amount of the loan and its interest at the rate of 9°/c annually they intended to constitute the following 'securities:
“ (A) The firm of Zalduondo Mier & Co. guaranteed the debt by means of pledge that in the same deed was created on each and all of the goods, merchandise, rights, stock and credits belonging to said firm of Zalduondo Mier & Co.
“ (B) As collateral security (not several on the part of the sureties, defendants [sic] herein) the following were also pledged:
“1. Said firm of Zalduondo Mier & Co., that is, the principal debtor, created in favor of the defendant bank a voluntary mortgage for ten thousand five hundred dollars ($10,500) principal and interest thereon at the rate of 9% annually on all the shares that said debtor, the firm of Zalduondo Mier & Co., had in the house Nos. 13 and 15 of San Justo Street, of this city. Said mortgage was created as a Second one.
“2. On the part of plaintiff Arturo Carreras y Delgado, in his character of non-several guarantor, a mortgage was created on the property described in the first averment of this complaint in favor of the American Colonial Bank, defendant, in order to guarantee the payment of eight thousand dollars ($8,000.00), part of the loan and interest.
*85“3. And on tlie part of Gerónimo Carreras, also in hi's character of non-several guarantor, two mortgages were created in favor of the defendant bank, to wit:
“(a) A mortgage in favor of said bank for three thousand five hundred dollars ($3,500,00) principal, plus interest at the rate of 9% annually, on the property described under letter (A) of the second averment of this complaint.
“(b) Another mortgage in favor of the defendant bank for the sum of 'six thousand dollars ($6,000.00) principal, plus interest at the rate of 9% annually, on the property described under letter (B) in said second averment of this complaint.
“VI. That said loan of twenty thousand dollars ($20,000.00) agreed upon between the firm of Zalduondo Mier & Co. and the defendant bank was made under the express condition that if the debtor failed to pay for two consecutive months the interest agreed upon, the total debt would be considered due and the bank would immediately proceed to collect it. And according to information and belief of plaintiffs, the principal debtor failed to pay the interest for more than three consecutive months and the bank was negligent in collecting the debt and enforcing the pledge. Besides, according to information and belief of plaintiffs, the said bank granted to the principal debtor an exten'sion of said debt without the previous consent or knowledge of the plaintiff-guarantors.
“VTI. Now plaintiffs allege that the above-mentioned deeds No. 15 of the 20th of June, 1922, executed before notary Jacinto Texidor, and No. 12 of the 29th of June, 1922, executed before notary Miguel García González, are null and void for the following reasons:
“ (a) Because they falsified the amount of the subsidiary contract of mortgage, raising said mortgage to the sum of twenty-eight thousand dollar's ($28,000.00) in order to guarantee twenty thousand dollars only, the amount of the principal obligation.
“(b) Because, the mortgage security given by the guarantors being a joint and not a several obligation, the sureties could not be obligated by a larger lien than the principal debtor. The principal debtor encumbered its property to the sum of ten thousand five hundred dollars ($10,500.00), while the encumbrance upon that of the guarantors exceeds that amount.
“VIII. Notwithstanding the defects of the mortgages above referred to, and notwithstanding the negligence of the defendant bank in failing to proceed against the properties given in pledge and in not attaching all the properties of the debtor, and notwithstanding the extensions granted to said principal debtor whereby the mortgage *86bond of tbe plaintiffs has been extinguished, the defendant bank has instituted in the District Court of the First Judicial District of San Juan ease No. 3055, a mortgage foreclosure proceeding, claiming from plaintiffs over seventeen thousand dollars ($17,000), the corresponding demand of payment having been issued by said court, 'said proceeding following the ordinary course of the Mortgage Law.
“IX. That according to information and belief of plaintiffs the debtor firm of Zalduondo Mier & Co., after the said loan deeds with security and mortgage were executed, at the demand of its creditor, the American Colonial Bank, delivered to this bank various securities for collection, such as accounts receivable, voucher's and notes of various debtors of said firm of Zalduondo Mier & Co., which securities defendant collected and appropriated, applying the proceeds to other transactions and accounts that it had pending with Zalduondo Mier & Co., whereby defendant, the American Colonial Bank, greatly reduced the guarantees and securities of the debtor Zalduondo Mier & Co., to the prejudice of plaintiffs a's collateral mortgage guarantors; wherefore we allege that plaintiffs were completely released from the obligations assumed by them in the said mortgages.
“X. Plaintiffs allege also as follows:
“That even if the said guaranties were in force, and even if the mortgages created a’s collateral security were valid, the fact is that the principal debt only amounted to the sum of twenty thousand dollars ($20,000.00), as heretofore stated, and it is also true, as already alleged, that the debtor firm of Zalduondo Mier & Co. secured by mortgage a part of said debt amounting to ten thousand five hundred dollars ($10,500); and, therefore, the mortgage guaranty of plaintiffs would never exceed the remaining amount, that is, the sirm of nine thousand five hundred dollars ($9,500); and, conse-quentfy, the American Colonial Bank as mortgagee could not foreclose said mortgages for a greater sum than nine thousand five hundred dollars ($9,500) and in the circumstances the bank.has proceeded with malice and negligence in not setting forth correctly the facts and circumstances that said district court should have had before it in order to authorize the mortgage foreclosure proceeding now pending and which we seek to nullify.
“PRAYER: By virtue of the foregoing averments plaintiffs pray thi’s District Court for a judgment herein in favor of plaintiffs and against defendant, the American Colonial Bank, holding null and ydid the mortgages created in favor of defendant in the deeds referred to, No. 15 of the 20th of June, 1922, executed before notary Jacinto Texidor, and No. 12 of the 29th of June of the same year *87before notary Miguel Garcia Gonzalez; ordering that said mortgages be canceled in the registry of property, decreeing the total extinguishment of plaintiffs’ obligations because of the acts of the defendant bank; or else reducing the mortgage bond to the sum of nine thousand five hundred dollars ($9,500); and in any event declaring the nullity of the said foreclosure proceeding now in progress, with costs and attorneys’ fees to plaintiffs.”
Manresa, speaking of the subsidiary character of contracts of pledge and of mortgage, at page 328, vol. 12, of Ms Commentaries, says:
“Therefore, such contracts are found in the same position as the security, with which they have an analogous and common character, and, as in the case of the security, the pledge and the mortgage can not lawfully exist without a valid obligation to which they serve as guarantee, because although the section on which we comment does not expre'ssly require the validity of the obligation that is to be the subject-matter of such contracts, as does section 1824 with respect to the security, the imposition of this condition is implied, because void acts, among which must be counted tho'se obligations guaranteed by pledge or mortgage when not valid, can not have any legal effect.”
Section 1752 of the Civil Code provides as follows:
“The extension granted to the debtor by the creditor, without the consent of the surety, extinguishes the security.”
Escrieke, at page 822 of Ms Dictionary, says:
“As a mortgage is a real right that is created upon the property of the debtor for the security of the debt or obligation, it should be neees'sarily inferred that in order that the mortgage may exist it is indispensable that there be an obligation or debt, for there can not be something aecesory without a principal thing. Therefore, if the obligation for the security of which the mortgage was created did not exist or was rescinded or annulled by any cause whatsoever, there was no such mortgage or it cea'sed to exist at the same time; and all of the other causes that might extinguish the principal obligation will equally cause the extinction of the mortgage.”
A cross reference reads thus:
“See security No. 1, Nos. V, VI, VII, VIII, IX, and X, die doctrines of which may be respectively applied to the mortgage, either *88when the mortgagor is the debtor himself or when he is a third person. ’ ’
From page 832 of the said dictionary we take the following:
“A principal mortgage is that which is created primarily or in the first place for the security of a debt or obligation; and a subsidiary mortgage is that which is established secondarily or in the second place for the same purpose in ca'se that the principal one is not sufficient. It is evident that in such a case the creditor can not enforce the subsidiary mortgage without the previous enforcement of the principal one; that is, without having found out that the property primarily encumbered is not sufficient to cover the amount of the debt.”
At page 840 we find the following:
“40. — As the mortgage is an accessory, and what is accessory can not subsist without the principal thing, it is clear that as soon as the debt or obligation for the security of which it was created L extinguished, the mortgage mu'st cease to exist. It can not survive the debt: Law No. 38, tit. 13, par. 5, But as the mortgage is indivisible in its effects, it is necessary, in order to extinguish it, that the principal debt or obligation be wholly extinguished; for instance, if only part of the debt were paid, the mortgage for the remainder would continue without alteration on all the properties that were subject to it; Law No. 19, tit. 1, book 20 of the Digest and Law's No. 43, tit. 43, par. 5.”
We are inclined to agree with counsel for appellee that the mere acceptance of a number of mortgages aggregating $28,000 to secure an indebtedness of $20,000 does not of necessity render each or all of such individual mortgages absolutely null and void. We see no reason why in any event the invalidity, if any, should not be limited to the excess over and above the amount sought to be secured. If so, then the question becomes largely academic in the instant case for the reason that the foreclosures in question are for a balance of some $17,000 only, while the original indebtedness amounted to approximately $2,500 more than that sum. See in this connection section 1727 of the Civil Code cited and relied upon by both parties.
*89That the doctrine of application of payments as between creditor and debtor should be permitted to prejudice sureties who have executed mortgages to secure their respective obligations, when payments have been made out of the proceeds of collateral securities pledged by the principal debtor, is by no means so clear.
The general rule, as we have shown, seems to be that the mortgage can not survive the extinguished primary obligation for the security of which the mortgage was executed. But appellee says:
‘ ‘ The difficulty with this argument is that here we are not dealing with sureties and guarantors, but with mortgages, and section 1752 has nothing to do with mortgages and only covers personal sureties. This section forms part of the Title XIV of the Fourth Book of the Code, while it is the XV Title that treats of ‘Contracts of Pledge, Mortgage and Antichresis,’ and in the XV Title there is no similar disposition, neither on pledges nor on mortgages. Section 1781 of the Civil Code show's plainly that section 1752 (in the Title XIV on sureties) is not applicable to mortgages or mortgage guaranties, because it provides as follows:
“ ‘Sec. 1781. The form, extension and effects of the mortgage, as well as what is relative to its creation, modification and extinction and what may not have been included in this chapter (Chapter III of Tit. XV) is hereby subjected to the dispositions of the Mortgage Law, which continues in force.’
“Therefore, it is not the Title XIV of the Civil Code on sureties, but the Mortgage iiaw, that rules in this matter, and if there is a disposition to the effect that a mortgage is extinguished when an extension of time is granted to the debtor, we have to look for it in the Mortgage Law, and it is evident that there is no such provision. On the contrary, the Mortgage Law, in its Sec. 105, which corresponds to section 1777 of the Civil Code, provides:
“ ‘A mortgage directly and immediately subjects the property upon which it is impo’sed, whoever the possessor of the property may be, to the performance of the obligation for the security of which it was created.’
“And section 122 provides as follows:
“ ‘Sec. 122. The mortgage shall continue intact as long as it is not canceled on all the property mortgaged, etc.’
“In the present ease, the three mortgages were created in order to *90perform tbe obligation, of paying $8,000, $3,500 and $6,000, respectively, to the American Colonial Bank, and it is admitted that this obligation has not been performed.
“If more jurisprudence were necessary in order to show that 'section 1752 is not applicable to mortgages, let ns see what Manresa says in his Commentaries with regard to the extent of the Title XIV of tbe Civil Code. (Manresa Commentaries, vol. 12, page 147):
“ ‘Tit. XIV. — ON Sureties. — The word surety has two meanings in legal phraseology; one which i's diffuse, ample and extensive, which comprises within its terms all of the contracts of guaranty; and the other, restricted and strict, that is, what constituted the surety itself.
“ ‘In the first of 'such acceptations, pledge and mortgage are also comprised, ***. The surety can be, therefore, personal, pignorative, and hypothecary, and so it is admitted by the laws in its classification; but for the present we are going to study this institution in it's strict meaning, that is, as a purely personal guaranty of the obligation insured by it.’
“What is the reason for that difference between the surety and the mortgage 1 Why is it that if an extension i's granted the surety is extinguished, but not the mortgage? Simply because of the difference between the two kinds of obligations. The surety is a purely personal obligation, with no public deed, with no obligatory inscription or any other formalities, and, even more important, without any effect on real property; while a mortgage is a solemn and formal document, in’scribed in the. public register, of a higher degree of dignity, and because, in short, it affects the title of real property, perhaps the most important fact that the jurists had in mind when they established our system of law. For this reason it is that they feet up the provision that a mortgage is not extinguished except by its payment.
“III. The Faot that the Bank has not Executed the Pledge does not Affect the MoRtgages. — Appellants argue in their brief that the bank had to proceed against the pledge before executing the mortgages, but they do not cite jurisprudence on this piont, and we hold that it has no foundation. If the creditor has two guaranties for a debt, .he has the right to proceed again'st the two at his will.
“IV. There is no Right of Excussion in this Case. — The right of excussion is a right of a guarantor and not of a mortgage debtor. On this point we transcribe what we have said before, discussing supposed error No. 2.
“V. The Application by ti-ie Bank of Sums Collected on other *91SECURITIES TO OTHER DEBTS OE ZALDUONDO MlER & Go. DOES NOT AFFECT the Mortgage of Plaintiffs. — It is alleged in tlie complaint that after the mortgages were executed Zalduondo Mier & Co. delivered other accounts, vouchers, and notes to the bank for their collection and applied this amount to other debts that Zalduondo Mier & Co. had with the bank. According to sections 1140, 1141 and 1142 of the Civil Code, plaintiffs can not complain of this unles's such applications were contrary to the instructions of Zalduondo Mier & Co. who are not a party- to this suit, and nothing is alleged with regard to this. In order to complain of the application made by the bank of 'such payments, plaintiffs have to allege facts showing that such application was illegal. But they do not set up any reason or facts to show that said application was illegal. For this reason, this averment does not show a cause of action.
“CONCLUSION. — Plaintiffs insist in considering this case as if it were of a personal surety, and the jurisprudence cited by them i's only applicable to personal sureties. But this is a case of the foreclosure of a mortgage on real property, that is, a real right, and plaintiff's cannot find a single judgment applying such provisions to mortgage's on personal property. The complaint does not allege sufficient facts to show a cause of action, and the district court did not err in sustaining the demurrer. The judgment must be affirmed.”
And the difficulty with this argument is that the subsidiary obligation of the mortgage contract can not be separated from the primary obligation which the mortgage is intended to secure. The one follows the other as the shadow follows the object upon which it depends for existence. In ninety-nine cases out of a hundred mortgages are given to secure a personal obligation. To adopt the theory of appellee would practically restrict the operation of the general rule to the single case wherein a mortgage is executed to guarantee the sufficiency of another pre-existing or co-existi'ng lien. Thus the exeeeption would then become the rule.
The question of the right of plaintiffs herein to demand a discussion of assets and especially of the collateral pledged by their principal, and the effect of the alleged failure on the part of the bank first to realize upon such collateral security, when asserted as a ground for annulment of the *92foreclosure proceedings, may well be left open until some additional light is brought to bear thereon by counsel.
If it be true, as alleged in the complaint and as for the purposes of this opinion we assume the fact to be, that the personal obligation of the mortgagors as security was extinguished by reason of an extension granted, without their knowledge or consent, to their principal, then the mortgage lien was lost and therefore can not be foreclosed.
The judgment appealed from must be reversed.
Mr. Justice Wolf concurred in the judgment.