On May 1,1935, Lillian G. Ellis, the defendant in the case below and respondent here, was the owner of certain lands in Fremont County, Wyoming, including certain isolated tracts hereinafter to be mentioned. A mortgage on the premises had been foreclosed and the period of redemption expired some time in the fall of 1935. Prior to May 1, 1935, she had also been the owner of certain personal property, consisting of cattle, sheep, and other property, and was also the owner of certain leases on state land. A mortgage had been given on the personal property to the Rock Springs National Bank. The mortgage had been foreclosed, but the defendant had been given the privilege to redeem her property until May 1, 1935. On the last mentioned date, and the day after, she entered into four transactions with the plaintiff. The first transaction was as follows: She borrowed of the plaintiff the sum of $25,000 and gave her note therefor, due in six months, providing for an attorney fee and expenses of collection in case of default. This amount was not sufficient to pay the Rock Springs National Bank, and she accordingly borrowed $1000 more on May 2. She gave a mortgage to secure all of this indebtedness on about 460 head of steers, 29 horses, about 1700 head of sheep, and some other personal property. This mortgage was also security for any future advances which plaintiff might make to the defendant. About $5600 was advanced after May 1,1935, of which $3750 was advanced by plaintiff to the defendant for operating expenses after the due date of the $25,000 note hereinbefore mentioned. The second transaction was as follows: On May 2, 1935, the defendant agreed to sell the sheep *74mentioned in the above mortgage for the sum of §8000. The plaintiif agreed to buy them, provided that the sale should subsequently be found to be satisfactory to it. It was so found thereafter and credit was given to the defendant on her indebtedness for the sum of §8000. The receipt given by plaintiff for this' credit will hereafter be mentioned. The third transaction was as follows: Either on May 1 or May 2, 1935, the defendant made an assignment to plaintiff of the leases on about 6833 acres of state land. These leases are in controversy here, the plaintiff claiming that they were assigned in consideration of its purchase of the above mentioned sheep, the defendant claiming that they were assigned merely as additional security for the indebtedness mentioned above. The leases expired on March 1, 1938. The fourth transaction was as follows: Plaintiff and defendant entered into a written contract for the purchase by plaintiff from the defendant of certain isolated tracts, consisting of 1040 acres, at the sum of §3.00 per acre, provided title thereto could be secured or for a lease thereof for the period of ten years, if title could not be secured, the lessee paying the annual taxes and assessments levied against the land. This contract will hereinafter be referred to in somewhat greater detail.
The indebtedness above mentioned, though some payments had been made thereon, was long in default when, on June 4, 1937, plaintiff made demand upon the defendant for the delivery of the property embraced in the chattel mortgage. According to the testimony of Mr. Maxwell, arrangements had been made with the brother of the defendant to take up the indebtedness, but it does not appear that any tender of any amount had been made to plaintiff of the amount due or any part of it before the commencement of this action, which was on June 9, 1937. At that time plaintiff. brought this action to replevin the mortgaged *75property, setting forth the chattel mortgage, the right of possession given therein to plaintiff in case of default, alleging the indebtedness due to be the sum of §15,500 and interest, that a demand had been made and refused, and praying for the right of possession of the property. On June 12, 1937, before the property was taken out of the possession of the defendant, the latter filed an answer and cross-petition, admitting the execution and delivery of the mortgage, that the contract for the isolated tracts above mentioned, the assignment of the leases, and the execution of the note and mortgage above mentioned, were all part of the same transaction; that plaintiff had failed to pay the taxes on the isolated tracts and that the amount thereof should be credited on her indebtedness; that the leases were assigned to plaintiff merely as additional security for such indebtedness; that she did not know the exact amount thereof and asked for an accounting. > She offered to pay to plaintiff the amount which the court should find due to the plaintiff and prayed that the assignment of the leases as well as the contract for the isolated tracts be declared as additional security for the mortgage indebtedness; that the plaintiff be enjoined from selling the property and that she have other relief as might be found to be equitable.
An injunction was issued by the court commissioner, as prayed. Plaintiff, on June 21, 1937, filed a. motion to vacate the injunction, alleging that the answer and cross-petition of defendant does not state facts sufficient to entitle her to an injunction; that the contract for the isolated tracts is void and of no force, because plaintiff has not placed herself in position to perform her part, and that the taxes on said lands cannot, in any event, be credited on the indebtedness; that a large amount of money is still due to the plaintiff and that it is at all events entitled to the possession of the mortgaged property. The motion was denied by the court *76on July 17, 1937, over the objection of the plaintiff. The plaintiff then filed a general demurrer, asked to withdraw it, and this being denied, filed, on August 7, 1937, its answer, denying, generally, the allegations of the answer and cross-petition, setting out in more detail the indebtedness due the plaintiff and alleging the provisions in the note and mortgage relating to attorney’s fees.
In the meantime, and on July 19, 1937, the court made an order in the case directing the sale of the cattle covered by the chattel mortgage and directing the proceeds thereof in the sum of $17,500 to be deposited with the clerk of court and that upon such deposit such clerk should release the chattel mortgage given to the plaintiff. This order was made over the objection of the plaintiff. A motion to vacate this order was subsequently denied. The sale was had on September 28, 1938, pursuant to the order theretofore made, counsel for the plaintiff consenting thereto, and the total amount deposited in the hands of the clerk of court, after deducting fees, was the sum of $17,506.07. Thereafter the clerk of court released the mortgage of record, as ordered. The case came on for final trial on March 31, 1938. A good deal of testimony was taken, most of it relating to the question as to whether or not the leases had been assigned as additional security. Plaintiff, at the close of the case in chief made by the defendant, moved for judgment in its favor for the reason that none of the evidence on the part of the defendant in any way tends to show that plaintiff was not entitled to the possession of the property at the commencement of the action. The motion was denied. On May 16, 1938, the court rendered its judgment herein, finding the amount due plaintiff on its indebtedness to be $16,767.33; that the value of the leases is $2.50 per acre over and above the rentals provided therein, or a total of $17,084.07. Judgment was en*77tered for plaintiff accordingly. Judgment was entered against the plaintiff in favor of the defendant for the value of the leases as above mentioned in the sum of ?17,084.07, with the provision that if the plaintiff should within 15 days assign to the defendant valid leases to the state lands instead of the original leases, which had expired on March 1, 1938, then and in that event such deposit should satisfy the judgment rendered against the plaintiff; that the clerk of court should pay over to plaintiff the amount of judgment in its favor upon the deposit of such leases for the defendant, and that the balance of the money in the sum of about $800 in the hands of the clerk of court should be paid over to the defendant or her attorneys. On May 27, 1937, the plaintiff, having secured new leases from the State of Wyoming to the said lands above mentioned, deposited them, together with an assignment thereof, with the clerk of court for the benefit of the defendant herein, stating that it had assigned the leases to the defendant. The form of the assignment does not appear in the record. Plaintiff at the same time asked that the court make an order directing the clerk of court to pay the plaintiff the amount of its judgment against the defendant. On July 14, 1938, the court refused to make such order, stating that it appeared to the court that the plaintiff had not complied with the judgment. Other facts pertinent herein will be mentioned hereafter. From the foregoing judgment, the plaintiff has appealed. The points raised and argued will, in so far as we think it necessary, be mentioned hereafter.
1. Defendant has moved to dismiss the appeal on the ground that the plaintiff voluntarily deposited the leases in court and thereby avoided a judgment of $17,084.07 against it, and because plaintiff moved that an order be entered for the clerk to turn over to it the amount of the judgment in its favor. It is held that *78there is no “waiver or estoppel where the right to the benefit is conceded by the opposite party, or appellant is entitled thereto in any event.” 4 C. J. S. 416; 2 Am. Jur. 977-978. The plaintiff is entitled to the amount of the judgment in its favor in any event, and that point is conceded, so that the foregoing rule would seem to be applicable in this case in so far as the plaintiff asked that this amount be turned over to it. Furthermore, the defendant resisted the motion in that connection, and the resistance was successful, so that defendant seems hardly to be in position to urge that point. There has, so far, been no acceptance of benefit.
The deposit of the leases was not voluntary, in the sense that it prevents an appeal. The situation in that respect is similar to that in the case of Pond Creek Coal Co. v. Runyon, 199 Ky. 539, 251 S. W. 841; see 4 C. J. S. 413. In that case the trial court cancelled a deed made to the defendant, provided that cancellation should not become effective if the defendant paid to plaintiff the sum of $2078.00. That sum was paid, and a motion was made to dismiss the appeal. The court, overruling it, stated:
“It is contended that the payment defeated the rescission adjudged, and that one cannot appeal from a judgment after satisfying or accepting that part of it that is favorable to him. The defect in this argument is that the judgment must be considered in its entirety, and, so considered, is not favorable but adverse to appellant. That it granted appellees either of two kinds of relief to be determined by the subsequent action of appellant does not affect the question. The requirement that the coal company pay $2078 to defeat a cancellation of the deed was a part of the judgment and was, for all practical purposes, equivalent to entering a judgment against the coal company for that sum in lieu of the judgment of cancellation. The payment was made in obedience to a part of the judgment that appellant was bound to perform in order to abate the more drastic decree of cancellation. The perform-*79anee, therefore, cannot be regarded as voluntary. If it was not voluntary, the right to appeal exists.”
So in the case at bar, the plaintiff turned over the new leases so as to avoid another, more drastic, alternative. Its feeling in that respect was not unreasonable, as will appear from some statements made hereafter. We are inclined to believe that any reasonable man would have acted likewise. Plaintiff did not so much accept a benefit, as it attempted to avoid an evil. Forfeiture of the right of appeal under the circumstances would be altogether too harsh to be consistent with justice. The motion to dismiss must be overruled.
2. The plaintiff assigns as error the holding of the court to the effect that the leases to state lands were given as security. The evidence on. that point was sharply conflicting. There is much force in the argument, met with some difficulty, that the fact that plaintiff agreed to buy some of defendant’s lands, namely the so-called isolated tracts, is consistent only with the theory that these leases became the absolute property of the plaintiff. On the other hand, there is in the record an insinuation that the reason for such purchase was that the plaintiff expected to become the owner of all of the defendant’s property within a comparatively short time — in other words, expected that she would be unable to redeem her property. Still, that theory is at least considerably weakened by the fact that she was given two years to redeem her property, though the indebtedness was due in six months after the loan was made, and plaintiff advanced various sums of money to defendant long after the due date. However these matters may be, there are indications in the record that neither the defendant nor the officers of plaintiff intentionally testified falsely. Our power in reviewing the evidence is limited in scope, and we must solve the apparently insuperable difficulty herein in that light. Defendant testified positively that the *80leases were assigned as security for her loan. There are some corroborating circumstances. Plaintiff, for instance, claimed that the leases were assigned as part of the transaction whereby the defendant sold the sheep embraced in the mortgage for the sum of eight thousand dollars. But when plaintiff gave defendant a receipt for that amount after the sheep were turned over to plaintiff, it stated: “for and in consideration of 1700 head of sheep mortgaged to the Yellowstone Sheep Company for $8000, credit was given for same on note of Lillian G. Ellis, dated May 1, 1935, of $7000 and her note of May 2, 1935, for one thousand dollars was marked paid and returned.” It may be noted that the consideration of $8000 is indicated to be for the sheep, not the sheep and the leases as claimed by plaintiff. While an attempt to explain this fact was made, still we are not able to say that the court was not warranted in considering the omission as a corroborating circumstance of defendant’s testimony. The testimony of the value of the sheep was in sharp conflict. Some of the testimony for the defendant fixed that value as high as $11,637. Without attempting to review the evidence in the case on the point under consideration any further, we have, after giving all the facts and circumstances their due weight, come to the conclusion, even if we discount to a large extent that the leases were worth over $17,000, that we are unable to say that the finding of the court is not supported by substantial evidence. Counsel for plaintiff appeal to the rule that the evidence to establish that an absolute assignment is held merely as security must be clear and convincing. It has been held that while the appellate court will review the evidence in the light of that rule, it will, nevertheless, not disturb the finding of the trial court, if there is substantial evidence warranting a clear and satisfactory conviction of the correctness of the finding. Wadleigh v. Phelps, 149 Cal. 627, 87 *81Pac. 93; Jones, Mortgages, (8th ed.) Sec. 1398. After full and most careful consideration we have come to the conclusion that we cannot say that this is not true in the case at bar, and we cannot, accordingly, interfere with the finding of the court.
Counsel for the plaintiff also complain very bitterly of the finding of the court to the effect that the state leases were worth $2.50 per acre over and above the rental paid thereon, or a total of $17,084.07, and rendering judgment against the plaintiff for that amount, with the alternative mentioned in the statement of facts. They say that the action of the court in rendering such judgment was in the nature of an unjustified coercion to force plaintiff to act against its will. The judgment seems high, particularly in view of the fact that defendant agreed to sell adjacent land, with a title in fee, for the sum of three dollars per acre, in view of the fact that the rental on such land only required the payment of taxes on the land, and in view of the early expiration of the leases. Still, there was evidence in support of the court’s finding, and we think that it merely followed what it conceived to be the weight of the evidence. In any event, the judgment in that respect was merely in the nature of an auxiliary order. An order similar in character was entered in the case of Minneapolis Threshing Machine Co. v. Curry, 75 Kans. 365, 89 Pac. 688. In the present state of the case, the foregoing judgment, or order, is wholly immaterial. Plaintiff deposited new leases as the court directed; defendant, it appears, has accepted them and has thereby rendered the money judgment nugatory. In fact, plaintiff’s counsel ask us to review the evidence bearing on the money judgment merely, as stated in their brief, “with a view to reversing the trial court in its finding that said leases (the original ones) were assigned conditionally.” We are unable to see the force of this position.
*82When plaintiff deposited the new leases for the state land, together with the assignment thereof, with the clerk of court, in order to be released from the money judgment against it, it asked the court to make an order directing the clerk of court to pay to plaintiff the amount of the judgment in its favor. The court refused to do so, holding that its order, to become effective as a release of the money judgment against plaintiff, had not been complied with. The record does not show the form of the assignments, hence shows neither compliance nor non-compliance, and we must, accordingly, presume the court’s action to be correct. It is stated in the briefs that the refusal of the court as above mentioned was based on the fact that the new leases were assigned subject to the reversal of the case in this court. It is undoubtedly true, as argued, that it is unfortunate that a large amount of money was tied up in the hands of the clerk of court without any benefit to any one whatever, and that no better way was found to dispose of the matter without so much harm. Still, if we may assume that the reason of the court’s action was as stated in the briefs, then the assignment must either be considered conditional, in which event the plaintiff did not, strictly at least, comply with the court’s order, as it set out to do, or it was not conditional — that is to say, making the assignment subject to reversal of this court was merely a statement of a right which the plaintiff had in any event. In the latter case, the plaintiff could have obtained the money by striking out, without harm, the clause to which objection was made. Again, plaintiff might have made a showing that the leases were in fact accepted. The record is silent when that was done. But whenever it was, that showing might have been made at least at that time. Of course, the caution exercised by counsel in this connection was entirely natural. It was due to the hope that this court might reverse the trial court *83in finding that the leases assigned to plaintiff by defendant were held merely as security. As we have seen, they have lost. On the whole, it seems that it was as much the fault of the plaintiff as that of the defendant that the money was not paid over, so that we do not feel that we can interfere in this connection.
3. The statute (Section 89-4007, Rev. St. 1931) provides that in case of replevin the defendant may give a re-delivery bond in an amount double of the value of the property and thus retain possession thereof during the pendency of the action. And it is further provided thereby that if the property taken on the writ of re-plevin is taken for the purpose of the foreclosure of a chattel mortgage, which, we take it, was the purpose in this case, then if the defendant tenders the amount due on such mortgage, with accrued costs, the sheriff shall immediately redeliver the property to the defendant. The defendant herein did not pursue either of the alternative courses thus pointed out by the statute, but instead set up certain defenses and caused an injunction to be issued. The plaintiff contends that these defenses were not admissible. Counsel for defendant seem to think that the point was not sufficiently raised by the plaintiff, in view of the fact that the demurrer filed was never ruled on. We think, however, that the record shows, both by the motion to vacate the injunction as well as by the motion made at the trial at the close of defendant’s testimony in chief, that plaintiff insisted upon this contention from beginning to the end; that the trial court ignored it, and that we should not refuse to pass on it on purely technical grounds.
We have held that no counterclaim may be filed in a replevin action, except only when it goes to the defeat of the right of possession. Schlessinger v. Cook, 9 Wyo. 256; 62 Pac. 152; Jones v. Parker, 39 Wyo. 423, 273 Pac. 687; Holland Furnace Co. v. Bird, 45 Wyo. 471, *8421 P. (2d) 825. The authorities on the point under consideration seem to be at variance. 54 C. J. 458-459. Some courts are more liberal in allowing a counterclaim than others. But no matter how liberal a rule may be in this connection, we must never overlook the fact, which we do not find clearly discussed, that, in the absence of the application of an equitable rule, a counterclaim or set-off, in order to constitute such at all, must in some way, directly or indirectly, affect the plaintiff’s right and meet the issue or part of the issue tendered by the plaintiff. A plaintiff in replevin tenders the issue of the right of possession. It may be combined with a claim for damages for detention or it may not. In this case we may say that only the issue of the right of possession was tendered. If that right is claimed under the provisions of a chattel mortgage, as in the case at bar, it ordinarily continues to exist until every part of the indebtedness secured thereby is paid. So that, however broad and sweeping a statute allowing a set-off or counterclaim may be, it cannot, in the very nature of things, if it consists of a demand for money only, affect the issue of the right of possession tendered by the plaintiff, unless the set-off or counterclaim at least equals the amount of the indebtedness. If any part remains unpaid, the right still exists. See 11 C. J. 604. If the counterclaim or set-off equals or exceeds the amount of plaintiff’s claim, it goes to the whole of the latter’s claim; it affects it, defeats it, and hence is permissible, as held in Jones v. Parker, supra. The same rule, and evidently for the same reason, was applied in McCormick Harvester Company v. Hill, 104 Mo. App. 544, 79 S. W. 745; Miller v. Thayer, 96 Kans. 278, 150 Pac. 537; Gardner v. Rischer, 35 Kans. 93, 10 Pac. 584; Shipmen Coal etc. Co. v. Pfeiffer, 11 Ind. App. 445, 39 N. E. 291; Ludden etc. Music Co. v. Hurnsby, 45 S. C. 111, 22 S. E. 781; See also Vallency v. Hunt, 20 N. D. 579, 129 N. W. 455. Again, if the *85defendant has a special lien on the property, that affects the entire claim of plaintiff. Ross & Curtice Co. v. Kent, 89 Nebr. 493, 131 N. W. 944, cited to us by defendant, may be explained on that theory or on the theory of equity. So if the plaintiff claims damages for the detention of the property in controversy, a counterclaim or set-off which affects these damages only may be interposed. That is the holding, for instance, in Lapham v. Osborne, 20 Nev. 168, 18 Pac. 881; Delco Light Co. v. John Levy etc., 99 Fla. 410, 128 So. 831. Some of the cases go further and hold that if the claim of the defendant exceeds the claim of plaintiff, the former may have judgment for the excess. See cases cited in McCormick Harvester Co. v. Hill, supra. In the case at bar defendant did not claim that the amount due and owing the plaintiff had been paid. It is conceded that a substantial amount is still due. Hence the defendant had no defense, legal in character, which in any way affected the right of the plaintiff to the possession of the property, except the alternative right granted by statute, namely, to give a redelivery bond or to tender the plaintiff the amount due to it under the mortgage. We must, accordingly, inquire as to whether or not defendant had an equitable defense which might be interposed herein. It is held in Massachusetts and Maine that when a statute provides for a mode of redemption, that is ordinarily the exclusive remedy. 14 C. J. S. 1091. That would seem to be merely an application of the familiar rule that an adequate remedy at law precludes resort to equity. 21 C. J. 37-39. However, it was said in the case of Loggie v. Chandler, 95 Me. 220, 49 Atl. 1059, an action to redeem:
“Of course there may be in some cases peculiar facts and circumstances in the nature of the property, the character of the condition, the conduct of the mortgagee, or, perhaps, in the accidents or misfortunes of the mortgagor, or in other respects, that would render it necessary for a court of equity to intervene to pro*86tect the contractual or statutory rights of the mortgagor or his assigns. Such facts and circumstances might give to the court jurisdiction in equity.”
We find a number of instances in which courts have applied equitable principles in actions of replevin. For instance, in cases involving conditional sales, courts, in order to prevent monstrous forfeitures, and unconscionable advantage, have permitted a vendee under such contract to set up a counterclaim for damages, and tender the vendor the balance due after deducting such damages. Buffer & Sons. Mfg. Co. v. Lucas, 112 N. C. 377, 17 S. E. 174, 19 L. R. A. 682; Iron Works v. Rea, 56 Ark. 450, 19 S. W. 1063; Nat. Cash Reg. Co. v. Petsas, 43 Wash. 376, 86 Pac. 662; Gilbert Co. v. Husted, 50 Wash. 61, 96 Pac. 835; Standard Furniture House v. Burrows, 59 Wash. 455, 110 Pac. 13. In Morgan & Co. v. Spangler, 20 O. S. 38, it was held that various liens may be adjusted in an action.of replevin. In Hinman v. Judson, 13 Barb. 620, 631 (cited in 14 C. J. S. 1091) the court stated: “I am of opinion, on authority as well as the reason and the necessity of the case, that under our present system of administering law and equity, a mortgagor or those standing in his shoes, can, when sued for the property mortgaged, claim the right to redeem in his defense to that suit.” While that was an action for conversion brought by the mortgagee against the mortgagor, we see no reason why the same rule should not be applied in an action of replevin, if ground therefor exists. See also Detroit Trust Co. v. Service Co., 262 Mich. 14, 247 N. W. 76. The cross-petition herein may in part at least be construed as one to redeem the property. Such petition to redeem goes to the whole of the plaintiff’s claim, and is, therefore, consistent with our holding in Jones v. Parker, supra. And we think that the circumstances in this case warranted the interference of equity. At common law, the absolute ownership of mortgaged *87chattel vested in the mortgagee on breach of the conditions of the mortgage. There was no right to redeem, except as given by a court of equity. That is no longer the law. The right to redeem is an essential part of a mortgage. 14 C. J. S. 1090. It is, however, still proper to resort to equity, where the mortgage takes the form of an absolute bill of sale of the property. 14 C. J. S. 1091; 11 C. J. 740; Forrest v. Burt, 67 Cal. App. 564, 227 Pac. 949; Alexander v. Meyenberg, 112 Ill. App. 223. In the case at bar part of the property, securing the mortgage involved herein was, as the court found, by way of an absolute assignment, and it was, accordingly, proper, if not necessary, to resort to equity in order to redeem it. And when equity has once been properly invoked, the court has power to consider and determine all the rights and claims of the parties relating to the subject matter, and to enter a decree which will finally determine them, to the end that a multiplicity of suits may be avoided and litigation may cease. 21 C. J. 661; Jones, supra, Sec. 1398. The right of a mortgagor to resort to equity is even more proper when, the mortgagee claims all or part of the property given as security, as his own than in other cases. Hippodrome Amusement Co. v. Redick, 109 Nebr. 390, 191 N. W. 317; see Pomeroy, Equity, (4th ed.) Sec. 1196. That is apparent. If the mortgagor pays or tenders the amount due, he is entitled to have the property which secures it released. If the defendant in this case had made payment or tender thereof, and had demanded the release of the mortgage and a reassignment of the leases, the demand would have been refused as to the latter. She would have had the right, of course, to make such payment or tender, and subsequently sue for the reassignment of the leases. But we do not think that she was compelled to do so. See Hippodrome Amusement Co. v. Redick, supra. To require the adoption of such a course might often be, and perhaps in *88this case would have been, oppressive. True, a court of equity may not assume power to administer justice because of the hardship of a case. 19 Am. Jur. 57. That is so because rules of law and of equity should be reasonably certain and should operate equally for or against all members of society, and should not be discriminative in a case simply because one may be somewhat richer than another. In the long run discrimination would be prejudicial to all who at some time or other might find it advisable to borrow money, and courts cannot adopt a policy detrimental to society or a large part of it merely to favor a particular individual. At the same time particular cases may present facts out of the ordinary. And cases in which a mortgagee claims part of the mortgage security by absolute title are of that class. If no such claim were made, a mortgagor might easily be able to borrow the money from some one else to pay off the mortgagee. The necessity to resort to equity would be proportionate to the extent to which the claim of absolute title is made. We cannot hold that the claim to an absolute title to the leases in this case is so trifling in extent as not to have any bearing herein, and, as already shown, we cannot say that the trial court was wrong in holding that the claim to absolute title herein was not warranted. It follows, we think, from what we have said, that the court was not necessarily compelled to find that the plaintiff was entitled to the right of possession at the time of the commencement of the action, a point which has been stressed in the brief of counsel for plaintiff. The court in doing equity had the right, we think, to leave the possession as it was, and direct all things to be done so as to protect the rights of both of the parties to the action.
4. On May 1,1935, the same date on which the mortgage herein mentioned was executed, the plaintiff and defendant entered into a written agreement in regard *89to the sale by defendant and the purchase by plaintiff of certain isolated tracts of land consisting- of 1040 acres, at the agreed price of §3.00 per acre. These tracts had been included in the mortgage to the Federal Land Bank, which mortgage had been foreclosed, the period of redemption expiring in the month of October, 1935. The defendant in the agreement represented that she would be able to refinance the loan due to the Federal Land Bank, and had information to the effect that the bank would accept the sum of three dollars per acre for the isolated tracts above mentioned, and release them from the operation of the mortgage. So, in the agreement of May 1, 1935, above mentioned, between the plaintiff and defendant, the former agreed to pay the purchase price agreed upon either to the defendant or to the above mentioned bank as soon as it had assurance that it would acquire a merchantable title. And it was further agreed that “in the event the said Federal Land Bank fails or refuses to release said lands from said mortgage, then the said vendor hereby agrees to lease said lands to the said vendee for a period of ten years in consideration of the said vendee paying the annual taxes and assessments levied against the same,” and that it should have immediate possession and continue in possession so long as it should pay the taxes and assessments levied against it. It appears that the lands in question are still in litigation between the Federal Land Bank and the defendant; that she has never been able to give title to the land, and so the purchase of the land has never been completed. The trial court in the final decree herein cancelled the entire agreement and directed possession of the lands involved to be delivered to the defendant. Plaintiff complains of this action of the court. Its counsel state that no relief was asked or prayed for in the cross-petition of the defendant. The defendant, however, prayed that the contract and the leases and the mortgage “be de-*90dared to be part of the same transaction, and together constitute a single transaction to be collateral security-only for the purported indebtedness.” While, accordingly, the cancellation of the contract was not asked directly, it was indirectly. And it would seem that the trial court’s action was brought about mainly or entirely by plaintiff’s acts and conduct. It did not pay the taxes assessed against the isolated tracts, and did not offer to do so, even at any time during the trial. The contract provided that it should have possession of the land “so long as it pays the taxes and assessments levied against the same.” It was not able to buy the land, and considered the contract at an end, for it stated in the motion to vacate the injunction already mentioned, supported by the affidavit of. plaintiff’s manager, as follows:
“As shown by the affidavit hereto attached marked Exhibit A’ and made a part hereof by reference thereto, the contract made and entered into between Lillian G. .Ellis and the Yellowstone Sheep Company on May 1, .1935, a copy of which is attached to the defendant’s answer and cross-petition and marked Exhibit A’, is void and of no force and effect for the reason that the defendant failed to redeem the land therein described from the foreclosure of the Federal Land Bank’s mortgage and said defendant has not placed herself in position to perform said agreement or any part thereof, and consequently, the plaintiff is not liable or chargeable under said contract for any taxes or assessments levied against the land described in said contract.”
Here plaintiff not alone repudiated the contract in so far as the payment of rental is concerned, and consequently the whole of the lease, but it also considered the whole of the contract as “void and of no force and effect.” We find no explanation of this treatment and this conduct in the record, or even in the briefs of counsel for plaintiff. We are unable to see how, in the face of the. record before us, we can say that the action of the trial court was prejudicial to the plaintiff.
*915. The note in suit provides that the maker thereof promises to pay all costs of collection, expenses and attorney fees in case of non-payment at maturity. The mortgage provides that in case of default, the mortgagee shall have the right to take possession of the property mortgaged and sell the same and satisfy the principal indebtedness, the expenses and an attorney fee equal to 10 per cent of the principal indebtedness. Plaintiff in its reply filed in this case alleged. these facts, and asked an allowance for such fee. Upon motion of the defendant, the court, the Hon. H. R. Christmas presiding, struck these allegations from the reply. On the trial of the case, the plaintiff sought to prove, but was not permitted to prove, that the note had been placed in the hands of plaintiff’s counsel for collection prior to the time of the commencement of this action, and that §1500 is a reasonable attorney’s fee. It is not improbable that the judge presiding at the trial of this case felt constrained by the previous order by which all reference to attorneys’ fees was stricken from the reply. We think that the ruling in both instances was error. This case perhaps presents as good example as can be found in legal lore to illustrate how the opinions of counsel are apt to be moulded or influenced by their zeal for the interests of their clients. Compare their views on the question of admissibility of the cross-petition herein with their view on the point now under consideration. There counsel for plaintiff insisted upon taking a narrow view as to what may be done in an action brought as one of replevin; counsel for defendant insisted upon taking a broad view. Their attitude is exactly the reverse in connection with the point now considered. Counsel for the defendant say that no attorney’s fee may be recovered in an action of replevin, and cite Knight et al. v. Beckwith Commercial Company, 6 Wyo. 501, 46 Pac. 1094; Finance Corp. v. Commercial Credit Co., 41 Wyo. 198, 283 Pac. *921101; Housely v. Tobin, 41 Wyo. 419, 286 Pac. 383. These cases accord with the rule stated in 54 C. J. 628, that “attorneys fees for services rendered in appearing for the prevailing party in the replevin suit are generally not allowed in that action.” See also 34 Cyc. 1565. That is in accordance with a more general rule, that in the absence of a contractual or statutory right, attorneys’ fees cannot ordinarily be recovered by a successful plaintiff. 15 C. J. 114. But in the case at bar, the plaintiff did not succeed in gaining possession of the property. It had, moreover, a contractual right to such fee. It will be found upon examination that no such contractual right was involved in the cases cited by counsel for defendant, or the cases cited in 34 Cyc. 1656 and 54 C. J. 628, except Anglo-California Trust Co. v. Collins, 192 Cal. 315, 219 Pac. 982, where a fee was allowed by the trial court, but where the appellate court refused to pass on the rightfulness thereof, and except Anders v. Chevrolet Co., 7 La. App. 481, where the court stated: “Conceding that the plaintiff could recover for attorney’s fees for prosecuting an action to recover his property, we think that in all cases where it is alleged that there was an agreement for the payment of attorney’s fees or that an amount has been paid as such, evidence should be offered to support the claim, and as there was not any evidence offered in support of the claim, it cannot be allowed.” Hence it is apparent that, in view of the difference between the facts in the case at bar and the cases relied on by counsel for the defendant, the latter do not serve as a precedent herein. In fact the difference is so radical that they do not serve even as a slight basis upon which to build a conclusion herein. We do not say that an attorney’s fee should be allowed in a replevin action, where the plaintiff is successful and obtains the possession of the property, even though the note and mortgage involved provide for such fee. In such case the *93payment of the indebtedness is not then directly involved ; it may be collected when such payment becomes subsequently involved in the situation then presented. Such fee is just as much a part of the indebtedness to be satisfied, as any other amount which may be due, provided, of course, that such fee has accrued. If it has accrued, it should be able to be collected at some time and in some manner. If the position of counsel for the defendant is correct, we can see no way in which the fee accrued could be collected, since the court undertook to settle all controversies between the parties. It would seem to be obvious that no such defect in the law should exist. It is held in many jurisdictions that the statutory action of replevin “is considered sufficiently flexible to authorize a determination of both legal and equitable rights, as it is the policy to settle in one action all the equities in the property which is the subject of the controversy.” 54 C. J. 586. Without saying how extensive the rule should be, it would seem that it ought to be applicable at least in cases where the rights, or part of the rights, of one of the parties in and to the property in controversy would otherwise be defeated. It is, moreover, we think, a general rule, or maxim, running through the law, that a man cannot do indirectly what he cannot do directly. So that an attorney fee should not be able to be defeated simply because of the peculiar turn or twist which the controversy between the party liable therefor and the party entitled thereto may take, at least if, as in this case, the defendant prevents the collection of the fee otherwise. Thus it was held in First National Bank v. Howard, 59 Okl. 237, 158 Pac. 927, an action of replevin, that a tender made after the commencement of the action must include attorney’s fees, and that it is error to exclude evidence in relation thereto, even though the fee was, by contract, payable only upon foreclosure.
See also Orient Petroleum Co. v. Bank & Trust Co., *9416 F. (2d) 117. So in actions for conversion of property covered by a chattel mortgage, in which action the same rule ordinarily obtains as the ordinary rule in replevin cases (38 Cyc. 2101; 65 C. J. 145), a contractual right to attorney fee has been enforced. Eade v. Bank, 117 Or. 47, 242 Pac. 833, 43 A. L. R. 374; Leesie v. Yamhill County, 136 Or. 295, 298 Pac. 908; Commercial Securities v. Mast, 45 Or. 394, 28 P. (2d) 635. In the Eade case, the court stated: “It would have been futile for plaintiffs to have instituted foreclosure proceedings, as execution upon the property was impossible. It became necessary to seek other relief. They were compelled to sue defendant to satisfy their liens. While the proceeding is in the form of conversion, it is equivalent to an action to collect the amount due on the notes, and the stipulation therein contained concerning attorney’s fees must be given force and effect. Otherwise stated, plaintiffs are entitled to as much relief in this action as they would have been in foreclosure proceedings, had it not been for the alleged wrongful act of the bank.” See also Mitchell v. Wood, 37 Cal. App. 329, 174 Pac. 677; De Costa v. Comfort, 80 Cal. 507, 22 Pac. 218. And we may mention in that connection that it has been held under a statute (like Sec. 89-4014) providing that when property claimed is not taken, the action may proceed as one for damages only, “the necessary effect is to render the proceeding one in the nature of an action of trover.” Pugh v. Calloway, 10 O. S. 488. These cases, without determining in what respect, if any, they should be limited, show at least that the form of action or proceeding is not necessarily the criterion as to whether or not attorney’s fees are recoverable.
If what is said is true in actions at law, it should at least be equally true in proceedings in equity. And it has been so held. Counsel for defendant seem to think that the plaintiff should have asked for fore*95closure of the mortgage. Why that was not done is, of course, clear from what we have already stated. But that contention, too, is, we think, clearly answered by the authorities. In the case of Nett v. Finance Corporation, 84 Mont. 116, 274 Pac. 497, a mortgagor sought an injunction against plaintiff to prevent the latter from selling the mortgaged property. He had tendered to the mortgagee (or rather, assignees thereof) the amount of the principal debt, but refused to pay the attorney fee, and that fee was the only matter in controversy. The assignee of the mortgage refused to release the mortgage on account of such non-payment. In its answer to the injunction suit, it did not ask for foreclosure but stated that unless enjoined, it would sell part of the mortgaged property to satisfy the attorney fee. The court stated in part:
“By necessary implication, plaintiff’s complaint in such an action constitutes an offer to do equity by paying any balance which the court may find still due on the note and mortgage; the answer to such a complaint is, in effect, a bill for an accounting or suit to foreclose the chattel mortgage; being a court of equity, in such case, the court is in position to dispose of the whole matter and may decree that the injunction issue unless the payee accept the amount found due to him, and may enter judgment against the payor for the amount so found due and thus foreclose the mortgage in court. Riemer v. Schlitz, 49 Wisc. 273, 5 N. W. 493; Graff v. Epstein, 238 Mich. 227, 213 N. W. 190.”
The case at' bar comes within the principle of that case, since defendant by its cross-petition turned the case, in part, into an injunction suit. See in that connection Church v. Brown, 150 Wash. 178, 272 Pac. 511. Furthermore, the cross-petition of the deefndant is also in the nature of a suit to redeem, which again is in equity, and hence also calls for the application of the maxim that he who seeks equity must do equity. In fact it is fundamental that when a mortgagor desires *96to redeem his property, he must pay, or at least offer to pay, the amount due under the mortgage. 11 C. J. 679; 14 C. J. S. 1094. Whether that is on the due date, or after the due date; whether it is before proceedings by the mortgagee are commenced, or whether it is after that time, should make no difference; the rule stated must apply. If at the time of such payment, or offer, an attorney fee has accrued, it is, as already indicated, part of the mortgage debt. Jones, Mortgages, (8th Ed.) Sec. 97; Folen v. Saxton, 31 Ida. 319, 171 Pac. 669; Johnson v. Hill, 23 Ala. App. 286, 124 So. 394; Ashley v. Hill, 21 Ala. App. 603, 110 So. 597; Bailey v. Butler, 138 Ala. 153, 35 So. 111; Durham v. Stephenson, 41 Fla. 112, 25 So. 284; Merriman v. Parkey, 136 Tenn. 645, 191 S. W. 217; John Hancock Mut. Life Ins. Co. v. Perry, 284 Fed. 1016, 2 F. (2d) 250; First Nat. Bank v. Howard, supra. Hence, a tender or offer to pay must include attorney’s fees which have then accrued. Navajo Live Stock & Trading Co. v. Bank, 26 N. M. 153, 189 Pac. 1108; Woodward v. Lutch, 69 Wash. 59, 124 Pac. 303; Flores v. Stone, 21 Cal. App. 105, 131 Pac. 348; First Nat. Bank v. Howard, supra; Church v. Brown, supra. The offer to pay in this case must, accordingly, be construed as including such fee, and the court erred in not allowing any. The court should proceed to allow a reasonable attorney’s fee herein, not exceeding the amount asked, based upon the services rendered in connection with the collection of the indebtedness, including the attorney’s fees, and excluding, of course, the services directly connected with the leases herein mentioned.
Counsel for defendant seem to suggest that no attorney’s fees should be allowed because plaintiff, in refusing to redeliver the leases, was a wrongdoer, and by its action in depositing the new leases in the office of the clerk has practically admitted that fact. We fail to find any such admission. We have already noted the *97reason why the new leases were deposited, and we have not been cited to any authorities holding that a contractual right like that at bar can, under circumstances appearing in this case, be defeated by way of penalty like that suggested by counsel. It is true that a contract for attorney’s fees will not, in certain cases, be enforced. See Graves v. Burch, 26 Wyo. 192, 181 Pac. 354; 14 C. J. 1089. But the only wrong, if there was in fact a wrong in the case at bar, is the fact that plaintiff claimed that the leases were not held as security. There is nothing, we think, in the record which would warrant the court in finding that its claim in this connection was not made in good faith. We can hardly afford to lay down a rule that such claim, though made in good faith, is made at the peril of a drastic penalty if it is not sustained. The mortgage indebtedness was due 20 months before the commencement of this action. During that time, defendant, so far as the record shows, made no tender of the amount admitted to be due. We hardly think that she was excused by the fact that she wanted an accounting. She knew, as well as plaintiff, the amount which she borrowed, and knew; the amounts which she paid on the indebtedness, except, perhaps, the taxes on the isolated tracts. But she could have found out the amount thereof as readily as the plaintiff. In fact, we do not find in the record that she ever asked for an accounting except in her cross-petition. She did not during the 20 months even offer to pay, if the leases should be reassigned. Nor was she ready to pay, unless it be just shortly before the action herein was commenced. If she was then ready to pay, through her brother, as testified to by Mr. Maxwell, no tender was made at that time, and in fact none was made unless it be through the sale of the cattle in September, 1937. It seems, accordingly, that plaintiff was clearly justified in placing the note and mortgage in the hands of attorneys for collection. *98There is nothing to indicate that their services were not necessary, and we think that it would be contrary to equity if a reasonable allowance for their fees were denied. See Cord v. Fowler, 120 Mich. 646; Kinkead v. Peete, 153 Iowa 199. In fact, it seems that the trial court refused them only on the ground that this action was commenced by plaintiff as one of replevin. But that, as we have seen, was not a sufficient reason.
The foregoing conclusion necessarily leads to the consideration of other matters. On July 19, 1937, the court, Hon. C. D. Murane presiding, upon application of the defendant, made an order directing the sale of the cattle included in plaintiff’s mortgage, and that upon the deposit of §17,500 of the proceeds of the sale with the clerk of court, the latter should release the mortgage of record. We can see no serious objection to the order of the court, except that it did not sufficiently protect the whole of the plaintiff’s claim. The court was doubtless, partially at least, misled by the allegation of plaintiff in its petition as to the amount due. If that had been correct the amount fixed by the court would have been sufficient. Thereafter on August 7, 1937, the plaintiff, in its reply, set forth the attorney’s fees due, and thereupon filed its motion to vacate the order of sale and release of the mortgage above mentioned upon the ground that the money required to be deposited was not sufficient. The application was denied by the court, the Hon. H. R. Christmas presiding. The action of the court was objectionable on the same ground as mentioned in connection with the original order. On September 28th, 1937, the cattle were sold, with the approval of counsel for plaintiff; the sum of $17,683.60 was deposited with the clerk of court, and he, on November 9, 1937, released the mortgage of record. The sale of the cattle cannot, of course, be recalled, but plaintiff is entitled to a first lien on all of the money deposited with the clerk, so that the *99attorney’s fee mentioned may be satisfied, and to the same end the release of the mortgage must be rescinded to the extent of property not embraced within the sale of September 28, 1937. Furthermore, since the court held that the leases were held as security, they are bound the same as the other property for the satisfaction of the fee. The new leases which the plaintiff deposited with the clerk of court, and which are now held by the defendant, were doubtless procured pursuant to the right of renewal granted to the old lessee by statute, and may, accordingly, be said to merely take the place of the old leases. That was doubtless the theory of the court in directing the plaintiff to procure new leases and deposit them. An order should, therefore, be entered that the plaintiff has a first lien on these leases till its claim here mentioned is satisfied, and if that is not done within a reasonable time such further order or orders should be made so as to make the lien effective.
6. Appellant also complains of the action of the court in assessing all costs in the trial court against it. We think the action was not justified. Plaintiff should pay all costs connected directly with the litigation as to the leases. Defendant should pay all costs connected with the enforcement of the indebtedness herein, including attorney’s fees, the sale of mortgaged property and matters incidental thereto. Other costs, if any, should be equally divided between the parties hereto.
. The judgment of the trial court is, accordingly, affirmed in holding the filing of the cross-petition of defendant admissible, in holding the leases herein mentioned to be security to the mortgage debt herein, in cancelling the contract for the isolated tracts, and in other respects as already indicated; it is reversed in refusing to allow an attorney’s fee, and in assessing the costs in the trial court, and the cause is remanded to the district court, with directions to immediately *100order the clerk of court to pay the plaintiff the amount of the judgment in its favor, to allow an attorney fee, and reassess the costs in the court below, in accordance with the foregoing opinion, and to make such other and further orders herein as heretofore expressed herein, and as may be necessary to carry the foregoing opinion into effect, and not inconsistent herewith. Each party will pay their own costs in this court.
Affirmed in part; in part, reversed with directions.
Riner, Ch. J., and Kimball, J., concur.