for the Court:
ON PETITION FOR REHEARING
The petition for rehearing is denied. The original opinion is withdrawn and the following substituted as the opinion of the Court.
Guaranty Mortgage Company appeals from that part of a final decree of the Chancery Court of Oktibbeha County ordering a judicial sale of a shopping center constructed in the City of Starkville, Mississippi. At the trial, Guaranty Mortgage contended that it had expended $1,123,434.48 and its deeds of trust secured this entire amount; however, the chancellor found that only $583,795.48 of this amount actually went into the construction of the shopping center, and Guaranty Mortgage does not appeal from this finding.
Guaranty Mortgage does not appeal from that part of the decree imposing liens on the shopping center in favor of Day and Night Air Conditioning Company and eighteen (18) other concerns furnishing labor, services and materials which went into the construction of the shopping center, totaling $339,573.46, and a lien imposed in favor of W. M. Seitz and the other landowners in the amount of $160,000.
Guaranty Mortgage contends that, when it became the successful bidder at the foreclosure sale of its deed of trust on September 25, 1975, it obtained fee simple title to the shopping center free and clear of the liens of the materialmen and the landowners; and, at most, the materialmen and landowners are limited to claims against the surplus proceeds arising from the foreclosure sale, being the difference between its successful bid of $700,000 and its superi- or lien for $583,795.48.
A brief summary of the facts will be helpful in understanding the conclusions reached by this Court.
W. M. Seitz and others owned a tract of land in Starkville, Mississippi and on July 1, *4401974, leased the land to Watkins Investments, a general partnership composed of Charles A. Watkins, general partner, and others, for a primary term of twenty-five years. Horace Henry, a prospective purchaser of the land under a contract of purchase, also executed the lease. Watkins Investments leased this land for the purpose of constructing a shopping center thereon. Under the terms of the lease, the improvements placed on the property by Watkins Investments were to become the property of the landowners upon the termination of the lease.
Watkins Investments desired to obtain interim construction financing from Guaranty Mortgage, but Guaranty Mortgage declined to make a construction loan on the project unless the landowners agreed to join in a deed of trust binding the fee simple ownership of the land. Accordingly, the landowners agreed to join in the execution of deeds of trust necessary to obtain interim construction and permanent financing.
Guaranty Mortgage made a construction loan commitment whereby it agreed to provide construction financing for the shopping center in the principal amount of $1,125,000, and Watkins Investments executed a promissory note for this amount. To secure this construction loan, on August 5, 1974, the Watkins partnership and W. M. Seitz and other landowners executed a deed of trust on the land in favor of Guaranty Mortgage. On September 27, 1974, a supplemental deed of trust was executed, the sole purpose being to add Mrs. Annie Sue Seitz Henry as an additional landowner to the August 5, 1974 deed of trust.
Thereafter, construction of the shopping center commenced in the name of Watkins Construction Company of Mississippi, Inc., a contracting corporation owned and controlled by Charles A. Watkins, the general partner of Watkins Investments.
At the time the Starkville Shopping Center was under construction, Watkins Investments had thirteen (13) other construction projects in varying stages of construction, all of which were financed through Guaranty Mortgage. The total commitment on these fourteen (14) projects was $11,750,000. Watkins Investments deposited all of the funds advanced by Guaranty Mortgage on these projects into one account at First American Bank, the parent company of Guaranty Mortgage, and all disbursements were made from this one account for the various construction projects. The chancellor found as a fact:
It is undisputed and undenied that these co-mingled funds were disbursed by Watkins to the knowledge of Guaranty, without control, supervision or limitation.
During the course of the construction of the Starkville Shopping Center, Watkins Investments encountered financial difficulty and Randall Travis, Chairman of the Board of Guaranty Mortgage, held two meetings with subcontractors involved in the construction of the shopping center. Travis proposed to the subcontractors that they recognize Guaranty Mortgage’s deed of trust as a first lien for all advancements to Watkins Investments on the project so the project could be completed. There was testimony that if they did not follow this procedure, he would wipe their names off the list. There was also testimony that Guaranty Mortgage proposed to advance an additional $225,000 on the Starkville Shopping Center project, but would not advance the funds unless its mortgage was “cleared up” so as to eliminate the subcontractors and materialmen.
During the period beginning December 3, 1974 and ending April 25,1975 the material-men involved in this case filed notice of their materialmen’s liens in the office of the Chancery Clerk of Oktibbeha County in accord with section 85-7-133 Mississippi Code Annotated (1972). Thereafter, in September, 1975, Guaranty Mortgage instituted proceedings to foreclose its construction money deed of trust by publishing notice of a trustee’s sale to be held on September 25, 1975. On September 24, 1975, Don Cook, d/b/a Cook Acoustics, and others, filed a petition to enforce mechanics’ and material-men’s liens in the Circuit Court of Oktib-beha County. The plaintiffs alleged that each one of them was entitled to a material-*441man’s lien against the land and the shopping center. In their petition, the plaintiffs requested the court to order a sale of the shopping center property and the proceeds applied to the payment of their claims. The petition further alleged that the construction lender, Guaranty Mortgage, was negligent in the disbursement and advancement of construction funds and that the liens claimed by the plaintiffs were superior to the interest of Guaranty Mortgage.
On September 23, 1975, W. M. Seitz and the other landowners filed a suit in the Chancery Court of Oktibbeha County against Guaranty Mortgage, the substituted trustee in the deed of trust of Guaranty Mortgage and all persons who had filed materialmen’s liens. On motion of the landowners the petition of the materialmen filed in the Circuit Court was transferred to the Chancery Court of Oktibbeha County on February 3,1976. Thereafter, the material-men who had filed the petitions in circuit court, filed answers to the Seitz bill of complaint and made their answers cross-bills, seeking enforcement of their liens. They also reformed their petition to enforce their liens by filing a bill of complaint. Guaranty Mortgage answered and the two cases were consolidated for trial.
In the meantime the substituted trustee sold the Starkville Shopping Center property on September 25,1975 to the highest and best bidder, Guaranty Mortgage, for the sum of $700,000.
From the above, we must determine the priority of the liens between Guaranty Mortgage, a construction money lender, the materialmen, and their respective rights to enforce their liens.
Section 85-7-131 Mississippi Code Annotated (1972) provides in part:
Every . . . building, or structure of any kind, and any fixed machinery, gearing or other fixture that may or may not be used or connected therewith, . . . erected, constructed, altered, or repaired, . . . shall be liable for the debt contracted and owing, for labor done or materials furnished, and debt for such services or construction shall be a lien thereon. The laborers, and materialmen and/or contractors who rendered services and constructed the improvements shall have a lien therefor. . . . Such lien shall take effect as to purchasers or en-cumbrancers for a valuable consideration without notice thereof, only from the time of commencing suit to enforce the lien, or from the time of filing the contract under which the lien arose, or notice thereof, in the office of the clerk of the chancery court, as hereinafter stated;
Our cases construing the rights of laborers or materialmen under the above statute and the rights of a lender advancing funds for a construction loan may be summarized as follows: The lien of a deed of trust securing a construction loan has priority over mechanics’ and materialmen’s liens only to the extent that; (a) the funds disbursed actually went into the construction, or (b) to the extent that the construction lender used reasonable diligence in disbursing the construction loan. See Weiss, Dreyfous and Seiferth, Inc. v. Natchez Inv. Co., Inc., 166 Miss. 253, 140 So. 736 (1932); 80 A.L.R.2d 179, 247 (1961); First National Bank of Greenville v. Virden, 208 Miss. 679, 45 So.2d 268 (1950), 80 A.L.R.2d 248 (1961); Deposit Guaranty Bank & Trust Co. v. J. F. Weaver Lbr. Co., 215 Miss. 183, 60 So.2d 598 (1952); Southern Life Insurance Co. v. Pollard Appliance Co., 247 Miss. 211, 150 So.2d 416 (1963); Wortman and Mann, Inc. v. Frierson Bldg. & Supply Co., 184 So.2d 857 (Miss.1966); North American Mortgage Investors v. Miss. Hardware Co., Inc., 360 So.2d 1203 (Miss.1978).
Guaranty Mortgage asserts that the rule announced in the cases cited in the preceding paragraph has no application here because they do not question the rule there announced. The holding of these cases cannot be so lightly disavowed because the lien of a deed of trust securing a construction loan has priority over mechanics’ and mate-rialmen’s liens only to the extent that the funds disbursed actually went into the construction or to the extent that it used rea*442sonable diligence in disbursing the construction loan.
Guaranty Mortgage was able to trace only $583,795.48 of the construction funds advanced Watkins Investments into the construction of the Starkville Plaza project. The chancellor held that Guaranty Mortgage did not use reasonable diligence in disbursing the construction loan and was entitled to a lien superior to the material-men only in the amount that went into the construction of the project. This finding of the chancellor is in accord with the rule announced in the cases cited above. Moreover, no appeal was taken from this finding of the chancellor.
MAY A CONSTRUCTION MONEY LENDER DEFEAT LIENS OF MA-TERIALMEN BY FORECLOSING A DEED OF TRUST AFTER NOTICE OF THE LIENS AND AFTER SUIT FILED TO ENFORCE THE LIENS?
It was settled in the cases of Smith and Vaile Co. v. Butts, 72 Miss. 269, 16 So. 242 (1894) and Smith and Vaile Co. v. Burns, 72 Miss. 966, 18 So. 483 (1895) that the purchaser at a trustee’s sale takes title pendente lite where suit to enforce materi-almen’s or mechanics’ liens on the property was commenced before the sale.
In Smith and Vaile v. Burns, supra, we held that the lien of plaintiff was derived from section 2698 Mississippi Code of 1892 [now section 85-7-131 Mississippi Code Annotated (1972)] and by the terms of the statute took effect against “purchasers or incumbrancers for a valuable consideration without notice thereof, from the time of commencing suit to enforce the lien.” The Court further held that Burns was a purchaser pendente lite and took title subject to the outcome of the appeal and subject to being divested because he took title “subject to all the contingencies to which the title of a vendor is ever liable.”
Guaranty Mortgage argues that the laborers and materialmen may look only to the excess of the proceeds of the foreclosure sale to satisfy their liens. This argument overlooks the holding of Smith and Vaile Co. v. Burns, supra, that the purchaser at a foreclosure sale, where suit has been instituted by laborers and materialmen to enforce a lien, takes title pendente lite, “subject to all the contingencies to which title of a vendor is ever liable.”
The laborers and materialmen filed their claims in the chancery clerk’s office more than six months before the trustee’s sale was advertised. Further, the material-men and laborers filed a petition in the circuit court to enforce their liens one day before the sale and filed notice of the suit on the lis pendens record. It therefore follows that when Guaranty Mortgage foreclosed the deed of trust, purchased the property at the trustee’s sale, it took title pendente lite subject to the contingency that the laborers’ and materialmen’s liens were valid.
If a mortgagee who advances money on a construction project could foreclose his deed of trust after laborers’ and materialmen’s liens are duly filed, and after suit is filed to enforce the liens, without the title conveyed at the sale being contingent upon the validity of the liens claimed, the rights of laborers and materialmen to their liens would be thereby destroyed.
Southern Life Insurance Co. et al v. Pollard Appliance Co., 247 Miss. 211, 150 So.2d 416 (1963) is another case which holds that foreclosure of a superior lien does not extinguish the rights of all materialmen.
Southwest Savings and Loan Association (hereafter Southwest) procured an assignment of a deed of trust for the purpose of securing construction funds. Southwest disbursed $10,000 to the contractor to build a house but did not use reasonable diligence to see that the advanced funds were used to pay materialmen and laborers. After the house was completed the owner executed a deed of trust to Southern Life Insurance Company (hereafter Southern). The attorney for Southern checked the records and discovered there were no claims of record on the property except the construction deed of trust owned by Southwest. He secured an affidavit from the owners and *443the contractor that no claims for labor or materials remained unpaid against the house, recorded the deed of trust, obtained a cancellation of the construction deed of trust from Southwest, and disbursed the proceeds of the loan. The amount of $10,-586 was disbursed to Southwest to pay off its construction loan deed of trust. In the meantime the owners had conveyed the property to Helen R. Embler, the wife of the contractor. A check for the balance of the loan, $3,148.01, was given to the owners who endorsed the check to Helen R. Em-bler.
Later, on December 21, 1960, Helen R. Embler executed a deed of trust to Southwest to secure a debt of her husband to Southwest in the sum of $25,000. This deed of trust was subordinate to the deed of trust of Southern which was dated and recorded on November 7, 1960. On March 10, 1961 the second deed of trust from Helen R. Embler to Southwest was foreclosed by the trustee and Southwest became the purchaser at the sale.
In the meantime the first monthly installment of the Southern deed of trust was not paid and Southern requested its attorney to foreclose. Southwest purchased the Southern deed of trust and the note on March 8, 1961. On November 22 and December 14, 1960 and January 11,1961 five materialmen filed notice of their liens. On June 16,1961, while the suits of the materialmen were pending, the Southern deed of trust owned by Southwest, was foreclosed and the property bought by it at the trustee’s sale.
The opinion in this case stated there were two questions presented for decision:
(1) Was Southern Life a bona fide purchaser of the deed of trust on the property without notice? (2) If Southern Life was, when it assigned this deed of trust to Southwest, did Southwest also take the status of a good faith holder? Or, in view of its prior dealings and the construction mortgage, is Southwest precluded from claiming as a good faith holder and asserting a first lien superior to those of materialmen? (247 Miss. at 220, 221, 150 So.2d at 420).
In answer to the first question we held that Southern took its deed of trust for value without notice of materialmen’s liens; therefore, its note and deed of trust were prior, superior liens to those of the materi-almen.
In answer to the second question we held that Southwest did not take the status of a good faith holder when it purchased the Southern deed of trust, and the liens of the materialmen reattached to the property in Southwest’s hands.
Foreclosure of a senior lien ordinarily extinguishes all junior liens; however, in Pollard we applied an exception to the rule. The construction money lender was not permitted to extinguish the liens of material-men by foreclosing a senior lien, but took title from the trustee subject to the lien of materialmen.
In the case before the Court, the landowners filed their bill of complaint against Guaranty Mortgage on September 23, 1975, two days before the trustee’s sale. Lis pen-dens notice was also filed on September 23, 1975. Guaranty Mortgage does not question the correctness of the chancellor’s finding that the landowners were entitled to a $160,000 lien on the land included in its deed of trust.
Guaranty Mortgage acquired title at the trustee’s sale subject to any relief that the landowners might obtain in their pending suit. This is the holding in Jones v. Jones, 249 Miss. 322, 161 So.2d 640 (1964) where we considered the effect of lis pen-dens on a pending suit and stated:
Lis pendens simply means a pending suit, and the doctrine denotes those principles and rules of law which define and limit the operation of the common-law maxim: ‘pendente lite nihil innovetur’, or that is to say, pending the suit nothing should be changed. 34 Am.Jur., Lis Pen-dens, § 2, p. 361.
The object of the doctrine of lis pen-dens is to keep the subject in controversy within the power of the court until final decree and to make it possible for courts to execute their judgment. All property *444which is the subject matter of the suit under this doctrine is res litigiosa and is in custodia legis. Massachusetts Bonding & Ins. Co. v. Knox, 220 N.C. 725, 18 S.E.2d 436, 138 A.L.R. 1438; Thompson on Real Property, Vol. 8 (1963), § 4308, p. 331.
Our lis pendens statute is section 755, Miss.Code 1942, Rec. The pertinent parts of this section are as follows: ‘When any person shall begin a suit in any court * * to enforce a lien upon, right to, or interest in any real estate * * * such person shall file with the clerk of the chancery court of each county where the real estate, or any part thereof, is situated, a notice containing the names of all the parties to the suit, a description of the real estate, and a brief statement of the nature of the lien, right or interest sought to be enforced * * *.’
It is said by Judge Griffith in his work on Mississippi Chancery Practice that: ‘The doctrine of lis pendens is that every person, including a stranger to the suit and whether bona fide or not, who acquires from a party to the litigation any interest in property real or personal during the pendency of a suit respecting a right, title or interest in such property takes subject to, and is conclusively bound by, the decree in such litigation * * See § 527, Griffith’s Miss. Chancery Practice (2d ed. 1950), p. 541.
In the case of Bank of Tupelo v. Motley, 127 Miss. 674, 90 So. 438, this Court pointed out that where a bank acquired a deed of trust on property described in a lis pendens notice in a suit to set aside a deed, the bank was bound by the decree entered in the suit, because the decree cancelling the deed related back to the filing of the bill and lis pendens notice. Cf. Smith v. Munger, 93 Miss. 627, 47 So. 676, occurring before the lis pendens statute. (249 Miss. at 329, 330, 161 So.2d at 643).
When Guaranty Mortgage purchased the property at the trustee’s sale, it took title subject to the outcome of the pending suit of the landowners and could not defeat their claim by foreclosing its deed of trust. If this were permitted, the effect of our lis pendens statute, section 11-47-3 Mississippi Code Annotated (1972), could be avoided by the simple expedient of a litigant disposing of property which is the subject matter of a suit before trial.
Our holding may be summarized as follows: Guaranty Mortgage did not use reasonable diligence in disbursing the construction loan to Watkins Investments for the construction of the Starkville Shopping Center and was entitled to a lien superior to the materialmen only in the amount that went into the construction of the project. Application of this rule is equitable because both Guaranty Mortgage and the material-men contributed to the cost of constructing the Starkville Shopping Center. When Watkins Investments defaulted, both Guaranty Mortgage and the materialmen could look only to the property which was enhanced in value by reason of their expenditures of money, time, effort and materials. They are entitled to receive the benefit of the contribution they made toward enhancing the value of the property. As to the landowners, the chancellor held that they were entitled to a lien, and no appeal was taken from this finding. Their suit to establish the lien was filed before the sale and notice of the suit was filed on the lis pen-dens record. When Guaranty Mortgage became the purchaser at the trustee’s sale it took title subject to the liens of the laborers, materialmen, and the landowners. We therefore affirm the chancellor with the exception next noted.
The only error committed by the chancery court was in ordering a judicial sale in the first instance without giving Guaranty Mortgage the right to pay off the materialmen in the amount of $339,573.46, plus interest from September 24, 1975 and the landowners in the amount of $160,000, plus interest from February 18, 1977, the date of the decree in the trial court.
In the event Guaranty Mortgage does not exercise its option of paying off the laborers, materialmen and landowners within thirty days after the judgment of this *445Court becomes final, then a judicial sale will be held in accordance with the requirements of the statute, and the proceeds of this sale used to satisfy the lien of Guaranty Mortgage in the sum of $583,795.48, plus interest as provided in the note from Watkins Investments from the date of disbursement to date of sale, then in satisfaction of the liens of materialmen, laborers and the landowners in the total sum of $499,573.46, plus interest as set forth in the preceding paragraph, any balance remaining to be paid to Guaranty Mortgage.
Court costs will be paid by Guaranty Mortgage, if it exercises its option, or from the first proceeds of the judicial sale, in the event Guaranty Mortgage does not exercise its option.
AFFIRMED IN PART, REVERSED IN PART AND REMANDED.
PATTERSON, C. J., SMITH and ROBERTSON, P. JJ. and WALKER, BROOM, LEE, BOWLING and COFER, JJ., concur.