delivered the opinion of the court.
It is the contention of appellant that appellee made a voluntary payment of the money received from the insurance company, with full knowledge of all the facts, and that it cannot recover the money back even though the money was paid under a mistake of law as to its rights in the premises.
We do not regard this contention as having any relation to the facts of this case. On May 28,1900, pursuant to the decree of foreclosure, the master sold the property described in the deed of trust and the decree for the sum of §5,550 to the complainant in the foreclosure suit, James Longley, and delivered to him a certificate of purchase. In his report of the sale the master says that he received from the sale the above amount of money and that he paid to James. Longley, the complainant, $4,914.58 to apply on the original debt, leaving a deficiency of $416.05 still due to the complainant. This report of sale and distribution was confirmed by the court on June 8, 1900. The confirmation of the sale related back to the day of sale. At this point of time, the deed of trust had expended its force, and the property described in it was no longer subject to the deed. “ The cause of action was merged in the foreclosure and sale, and all the rights and liabilities growing out ■ of the trust deed were transferred to the decree. When a mortgage is foreclosed by suit the decree of the court becomes the basis of title. (United States Mortgage Co. v. Gross, 93 Ill. 483.) By the decree, and the execution thereof, the legal liability was transferred to the decree. The debt was merged in the decree and the rights and liabilities growing out of the trust deed were fixed by such decree and to be enforced through its provisions. Wayman v. Cochrane, 35 Ill. 152.”
Therefore prior to the time of the destruction of the church building by fire, May 29, 1900, the trust deed had been extinguished; and it cannot be considered that the insurance took the place of the destroyed building under the trust deed which by the decree became functus officio, and no longer existed. Ogle v. Koerner, 140 Ill. 170; Seligman v. Laubheimer, 58 id. 124. “ Mor does it in any way affect the result that the holder of the secured indebtedness becomes the purchaser at the sale, whether he be the mortgagee or cestui que trust, or not. By becoming the purchaser a new relation created by the statute exists, in no wise dependent upon any privity of contract between the purchaser and mortgagor.” Lightcap v. Bradley, 180 Ill. 510.
In Davis v. Dale, 150 Ill. 239, it was said: “The contention of counsel for appellant that in some way the purchaser at the master’s sale acquired equities, for the payment of taxes by the grantor, is equally untenable. By virtue of the lien created, the mortgagee or cestui que trust had the right to have the security foreclosed and the property sold, and the proceeds applied in payment of the secured debt. But when this had been done and the lien enforced by a sale of the property and the proceeds applied, the mortgage or trust deed has expended its force, and the property is no longer subject to its provisions.”
It follows then that Stephen W. Rawson, appellant, had ceased to be the trustee in the deed of trust, and no longer held any trust relations to the property or to Longlev, the cestui que trust under the trust deed before the destruction of the building. This relation, by the foreclosure of the lien and the proceedings hereunder, was terminated as effectually as if the debt secured had been paid and the trust deed released. King v. Insurance Co., 7 Cush. 1.
As between Bethesda Baptist Church, appellee, and Longlev, the purchaser, appellee still held the title to the property, with this qualification that by the decree and sale the amount and time of redemption had become fixed, and a failure to redeem within the allotted time would divest its estate. On the other hand, Longley had acquired by virtue of the sale and the master’s certificate the right to have the property at the end of the period of redemption, in the event no redemption was made. Stephens v. Illinois Mutual Fire Ins. Co., 43 Ill. 327; Lightcap v. Bradley, supra, and cases there cited; 1 Jones on Mortgages, Sec. 398; Royal Ins. Co. v. Stinson, 103 U. S. 30. So that at the time of the fire the appellee church held the title to the property and had the right to the rents, issues and profits thereof, and had the right of .redemption. This was an insurable interest. It had procured the insurance and paid for it, and was entitled to the money in question.
The argument of appellant in support of*his contention is based upon the provision of the policy which contained the usual mortgage clause making the loss, if any, payable to appellant as trustee, and the action of appellee in endorsing the draft.
The fact that the agent of the insurance company made his draft payable to the joint order of the trustees of the church and. appellant, as trustee, and then induced the ■ trustees of the church to endorse it in blank and then himself delivered it to appellant, did not, we think, constitute a payment by appellee to appellant, or in any -way affect the rights of appellee to the money. The delivery of the draft to appellant was not payment. It was only the means of obtaining payment, in the absence of an agreement between the parties that it should constitute payment of the debt. Woodburn v. Woodburn, 115 Ill. 427. The draft had to be accepted and honored by the insurance company before there was any payment. The only payment that was made was by the insurance company to appellant and appellant received the money, not in his own right, but for and on behalf of -appellee. Brown v. Leckie, 43 Ill 497. The draft was made payable to the joint order of the church trustees and appellant as trustee, as a mere matter of precaution, and the agent of the insurance company did.not part with it until after its endorsement by the trustees of the church, and then he himself delivered it to appellant.
Under the contract of insurance the company was not bound to pay the money to appellee, but was bound to pay it to appellant as trustee. When his right to receive it as trustee ceased by virtue of the foreclosure proceedings, as we have seen, he could receive the money as the agent of appellee only, and when he collected it he became bound to account for it to appellee. 1 Jones on Mtges., Sec. 409; King v. State Mutual Fire Ins. Co., supra.
When appellant received the insurance money he paid the deficiency decree entered in the foreclosure case; and thus the entire indebtedness to Longley was paid. Longley had no claim upon the money, therefore, in the hands of appellant, and appellant was bound to account to appellee for the balance of the fund in his hands.
Bo question is raised by appellee here as to the propriety of the payment of the deficiency decree.
The judgment of the Superior Court is affirmed.
Affirmed.