The appellees, as owners of a trust deed in the nature of a mortgage, were proceeding under the power of sale therein to advertise the mortgaged premises, the property of appellant’s ward, for sale, when appellant filed' his complaint with the court, praying that the appellees be enjoined from selling the property under the power of sale, and'assigned as reasons therefor, among others, that such a proceeding was unauthorized by law and was in violation of law, and that such a sale and a conveyance thereunder would create and east a cloud upon the title of his ward. The appellees demurred 'to the complaint, which was sustained, and the complaint was dismissed.
Appellant assigns as error the ruling sustaining demurrer and judgment of dismissal.
At the time of this proceeding, December, 1914, paragraph 4113 of Civil Code of 1913, contained the law relied upon ’by appellant to sustain his contention. That paragraph reads:
“All mortgages of real property and all deeds of trust in the nature of mortgages shall, notwithstanding any provision contained in the mortgage, be foreclosed by action in a court of competent jurisdiction.”
This is a remedial statute, and it is well settled that laws changing the remedy or substituting another and different remedy are valid, so long as they do not impair the obligation of contracts. 8 Cyc. 995; Andrade v. Andrade, 14 Ariz. 379, 128 Pac. 813; Steinfeld v. Neilsen, 15 Ariz. 424, 139 Pac. 879, 896.
*95The trust deéd was executed in 1899, and, under the-law as it then existed, the power of sale could be exercised by the trustee by advertising as herein undertaken - (paragraphs 2358, 2359, Revised Statutes of 1887), and it is contended by appellees that any law that deprives them of pursuing that remedy impairs their contract.
The statute of limitations is not made an issue by the pleadings, except inferentially in this: That it is apparent from the face of the pleading that the trust deed was executed more than four years before this action was begun. The appellant relies for relief upon the proposition that since paragraph 4113, supra, became law, all mortgages and trust deeds in the nature of mortgages must be foreclosed in court. The appellees meet this contention in their answer by setting forth the judgment of this court in Provident Mutual Building-Loan etc. v. Schwertner, 15 Ariz. 517, 140 Pac. 495, as res adjudicata. But in that case we simply decided that equity would not assist the grantee of the mortgagor by canceling upon his complaint an unpaid, outlawed mortgage, and thus remove a cloud upon his record title, upon the theory that the statute of limitations should be used as a shield and not as a sword. On the basis of that decision, if the appellees are now compelled to foreclose in court, the appellant could, if he so chose, interpose the statute as • a bar; the mortgage being some ten years overdue.
The statute of limitations affects the remedy and not the cause of action. That the appellees, by failure to bring their action on the note secured by trust deed, opened the gate to the plea of the statute, there is no question. The same is true in an action to foreclose, 'but they contend they have a remedy in their power of sale that cannot be taken from them. This is a confession on their part that the statute has run, but, for want of an available remedy, the appellant’s hands are tied. If the statute has actually run, and of that there is no question, all that paragraph 4113, supra, did, was to supply appellant a remedy by which he could avail himself of the bar.
The only case we have been able to find bearing directly upon the point involved is Scott v. District Court, 15 N. D. 259, 107 N. W. 61. That case involved the construction of a statute that provided that, if the mortgagor- has a legal counterclaim or any other valid defense against the collection *96of the whole or any part of the amount claimed to 'be due on such mortgage, the court may, by an order to that effect, enjoin the mortgagee or his assignee from foreclosing such mortgage by advertisement. The court said:
“The effect of this law is to subject the mortgagee’s right to exercise the power of sale to the right of the mortgagor to forever prevent that method • of foreclosure, so as to enable the latter to plead and prove, in an action to foreclose any defense or counterclaim he may have. The defense which the mortgagor may thus avail himself of clearly includes the defense of the statute of limitations.”
It was accordingly held that an injunction would lie to restrain a sale under the power of sale and thereby prevent a cloud from being cast on the title of mortgagor. It was also contended in that case that the statute compelling a foreclosure in court was unconstitutional in that it impaired the terms of a contract. On that point, the court said:
“The power of sale was a mere remedy, subject to the control of the legislature. The fact that the contract stipulated for this cumulative remedy did not make it any more sacred than any other remedy. It was merely one of the means by which the obligation evidenced by the mortgage contract could be enforced. It was not the contract obligation which the Constitution forbids the impairment of” — citing authorities.
The question as to whether a plaintiff may invoke the aid of a court of equity to restrain a threatened sale under a power of sale contained in the mortgage or deed of trust, without tendering payment of the outlawed, but unpaid debt, has been answered both ways.
The latest decision passing upon the question that we have been able to find was rendered by the court of appeals of California; the supreme court of that state denying a rehearing. It is Goldwater v. Hibernia Sav. & Loan Soc., 19 Cal. App. 511, 126 Pac. 861, wherein the court said in response to the rule that “he who seeks equity must do equity,” when urged upon it:
“But in this case plaintiff is not seeking to disturb the status quo. He is not asking the court to remove a cloud upon his title, except as it may incidentally do so by preventing the appellant from taking aggressive and further action that will put upon plaintiff’s title a -further and additional *97cloud. The power involved in this case contains the provision that, the recitals in the deed that may be given upon the sale under the power ‘must be deemed conclusive evidence of the facts recited.’ Appellant is threatening to proceed to sell under this lapsed power and, as it is alleged, will execute a deed to the purchaser under such sale. It cannot be doubted but that, if appellant should sue plaintiff in foreclosure, plaintiff could successfully plead the bar of the statute in such a suit in equity. It seems to us that plaintiff now bears the same relation to appellant, in presenting for adjudication his right- to prevent the enforcement of the extinguished lien, by the affirmative action of appellant in the threatened sale which may result in a deed containing recitals that may result in extinguishing plaintiff’s title, that he would bear to appellant if appellant should sue in foreclosure and plaintiff herein should plead the bar of the statute. In either case he would but be setting up the bar of the statute to prevent affirmative action against him. He would be using the bar of the statute as a shield and not as a sword.”
The judgment is reversed and case remanded, with directions that injunction issue permanently restraining appellees from exercising the power of sale by advertisement.
FEANKLIN and CUNNINGHAM, JJ., concur.