This appeal is from a final decree of the chancery court for the foreclosure of a mortgage on land executed by appellants to appellee.
Error is imputed to the decree in three .particulars: (1) Because of a variance between the allegations of the bill and the proof; the bill alleging that the security was given for a then existing debt due from the mortgagors to the mortgagee, Avhen in fact it was given to •indemnify the mortgagee against any loss that he might sustain by reason of his signing a note as security for R. M. Cooper, one of the mortgagors. (2) Because, when the bill to foreclose was filed by the mortgagee, *125he had not then paid the security debt, had suffered no loss, and was not entitled to enforce the security. (3) because there was no stipulation in the mortgage authorizing the allowance of an attorney’s fee for foreclosing the mortgage by bill in chancery; a fee of $50 being allowed by the chancellor in that behalf.
1. The mortgage contract, which is made an exhibit to the bill of complaint, recites an indebtedness of $330 due from the mortgagors to the mortgagee for money advanced by him to them to make a crop, -for which the note was given. The bill of complaint declares upon the mortgage- and note according to their prima facie import and effect, and just as the parties themselves saw fit to deliberately frame and memorialize their agreement. To so describe the contract is surely in accordance with the rules of good pleading. It is true that the consideration as stated even in a Avritten contract may, as betAveen the parties, be inquired into, a different consideration may be shoAvn, and the contract given effect accordingly. But proof of a different consideration AAdiich does not change the essential rights of the parties, nor destroy the right of redress, cannot be treated as a variance.
2. “A surety or guarantor cannot recover indemnity from the principal, or indemnitor, until he has been •damnified; in other Avords, until he has paid the debt; unless there is a clause in the contract of indemnity AAdiich varies this general rule.” — Lane v. Westmoreland, 79 Ala. 374. And again it is said: “The rights of the surety must be determined by the terms of the instrument Avhich creates the indemnity. If the mortgage or other security is not given to secure the debt, or to proAdde a fund for its payment, but merely to save harmless from a contingent liability or loss, the contingency must happen, or the loss be sustained, be*126fore a right arises in favor of the creditor to the indemnity.” — Daniel v. Hunt, 77 Ala. 469. It is to be noted that these statements of the rale, by their own express limitations, apply only to those cases in which the parties have not stipulated otherwise. It is competent for the parties to so frame their contract, either by the terms of the principal contract, or by a separate independent contract, as to authorize the surety to proceed against his principal, or against the independent security given by the principal to the surety, at any stated time, independently of the surety’s prior payment of the principal debt. Such we conceive to be the nature and purpose of the present mortgage security. Indeed, as between these parties, their idea seems to be to treat, the note due to the bank as the debt solely of the surety, which he was to pay at all events, in consideration of which the surety accepted the obligation of his principal due and payable at a fixed time. But, if their purpose did not go so far as this, it is.still impossible to escape the conclusion that this independent security was intended to provide a fund, out of which, after a stated time, the surety-mortgagee could satisfy the principal debt without first making the payment out of his own pocket.
The present case cannot be distinguished from the case of Russell v. La Roque, 11 Ala. 352, 354, where it was said: “It is frequently a matter of great doubt and difficulty what the true nature of an indemnity is; but the circumstance which influenced our judgment previously, and which has confirmed it on subsequent reflection, is the fact that the note executed as an indemnity Avas payable at a day certain, thus establishing very satisfactorily that the right of the surety to an action on the note was not to depend on his being compelled to pay the debt of his principal, as the time when that *127Avould happen Avas uncertain, if it happened at all, whilst the right to sue at a particular time was ascertained and depended on no contingency.”
Hence, conceding that the complainant had not paid the principal debt at the time he filed this bill, he may nevertheless proceed to realize on the independent security given to him. In such a case, however, it seems clear that the mortgagor-principal would have an equity to have the fund so realized applied to the principal debt, if he still remained liable thereon.
3. The mortgage contains the usual power of sale, and provides that, upon said sale being made, the proceeds thereof shall be applied to the expenses of the sale, and to the $330 note, etc., “together with reasonable attorney’s fee for foreclosing this mortgage.”
The provision here made is manifestly for an attorney’s fee for foreclosing by sale under the power, and not by suit in chancery. Hence there Avas error in the allowance of an attorney’s fee for this latter service.— Tompkins v. Drennen, 95 Ala. 463, 466, 10 South. 638. The cases of Bedell v. N. E. M. S. Co., 91 Ala. 325, 8 South. 494, and Pollard v. A. F. L. & M. Co., 103 Ala. 289, 16 South. 801, by reason of the difference in the stipulations inAmlved, are not in point, and so-no question can arise here as to the necessity of a resort to a proceeding in chancery.
The decree ol the chancellor will be modified by eliminating the fee allowed, and, as modified, avüI be affirmed. The costs of this appeal will be taxed in equal part against appellants'and appellee.
Modified and affirmed.
All the Justices concur, except Dowdell, C. J., not sitting.