delivered the opinion of the court.
This is an injunction bill, alleging that on March 8, 1900, *65John. H. Phillips and A. L. Weaver conveyed to J. T. Barham, trustee, 10.86 acres of land in trust to secure W. E. Barrett the payment of a certain note for $2,200; that the grantors had afterwards divided the land, and had it laid off into 154 town lots, with streets and alleys; and that this plat, entitled “Map of Freeman’s Addition to the City of Newport News,” had been duly acknowledged and recorded in the clerk’s office of the county in which the land lay; that a number of these lots had been sold and conveyed to the complainant and other persons; that mechanics’ liens had been acquired upon buildings erected upon some of the lots; and that judgments had also been obtained, which rested as liens on the property. It is further alleged that Barham, trustee, had advertised the land for sale as a whole, and that, if sold as advertised, it would not bring enough to pay off the liens, but that, if sold in lots, it would pay off the liens, and leave the parcels that had been aliened undisturbed. The prayer of the bill is that the trustee and the beneficiary under the trust deed be made parties defendant, and enjoined from selling the property until the further order of the court; that the lots not sold be first subjected, before selling the lots of complainant; that all necessary accounts be taken; and concluding with the usual prayer for general relief. The injunction was granted, whereupon the trustee and the beneficiary under the deed of trust each filed an answer in which they admit all the allegations of the bill, except that they neither admit nor deny that the property, if sold in lots, will satisfy the liens, and leave undisturbed the lots that had been aliened. W. E. Barrett, the beneficiary under the deed of trust, further answering, says that the mechanics’ and judgment liens referred to in the bill were acquired after the deed of trust had been executed and recorded, and were therefore not valid encumbrances as against the deed of trust. J. T. Barham, the trustee, further answering, says that before the property was advertised he did not know that any one *66other than.-the grantors in the deed of trust and the beneficiary thereunder had any interest in the subject; that he intended to sell the property according’ to law and the terms of the deed of trust; and that if any one had requested him, before the sale, to sell the property in lots, he would have given such request due and impartial consideration, and would not intentionally have permitted any party to be prejudiced by his act, but that no such request was made of him.
On October 5, 1901, the defendants moved the Circuit Court, iu vacation, to dissolve the injunction. At the same time the plaintiff asked leave to file an amended bill, which set forth more in detail the several parties to whom lots had been sold, and the several liens resting upon the property. Upon the motion to dissolve, the court declined to permit the amended bill, as such, to be filed, but allowed it to be used as an affidavit in support of the original bill.
An affidavit by John H. Phillips, one of the grantors in the deed of trust, was also filed, showing that the Virginia Lumber and Manufacturing Company had mechanics’ liens on three houses built on the property advertised for sale. Affiant.further says that, unless an account of the liens and their order of priority is taken, and the property sold by the lot or in parcels, the proceeds will be insufficient to pay all the liens without selling the lots purchased by the plaintiff and others. Thereupon a vacation order was entered, bringing the cause on to be heard upon the original bill, the answers of the defendants, and the affidavits filed, upon consideration whereof the injunction theretofore granted was so amended as to only enjoin the trustee from selling the property as a whole, and in all other respects it was dissolved.
From this decree the present appeal has been allowed.
A trustee in a deed of trust is the agent of both parties, and bound to act impartially between them; nor ought he to permit the urgency of the creditor to force the sale, under circum*67stances injurious to the debtor, at an inadequate price. He is bound to bring the estate to hammer under every possible advantage to his cestuis que trustent; and he should use all reasonable diligence to obtain the best price. He may and ought, of his own motion, to apply to a court of equity to remove impediments to a fair execution of his trust, to remove any cloud hanging over the title, and to adjust accounts, if necessary, in order to ascertain the actual debt which ought to be raised by the sale, or the amount of prior incumbrances. And he will be justified in delaying for these preliminary purposes the sale of the property until such resort may be had to a court of equity. If he should .fail to do this, the party injured by his default has an unquestionable right to do it—whether such party be the creditor secured by the deed of trust, or a subsequent incumbrancer, or the debtor himself, or his assigns. Rosset v. Fisher, 11 Gratt. 492.
If a trustee in pais, with power to make sale of real estate for the payment of debts, attempts to make such sale while there is a cloud resting on the title to the property, or there is any doubt or uncertainty as to the debts secured or the amounts thereof, or a dispute or conflict among the creditors as to their respective claims, a court of equity, on a bill filed by the debtor, secured creditor, subsequent incumbrancer, or other person having an interest, will restrain the trustee until these impediments to a fair sale have by its aid been removed as far as it is practicable to do so. Shultz v. Sansbrough, 33 Gratt. 567; Shickel v. Improvement Co., 99 Va. 88, 37 S. E. 813.
But it is not the duty of a trustee in every case to invoke the aid of a court of equity before making a sale of the trust subject, where there are liens thereon; and to hold that it is, or that if he fails tó do so an injunction will be awarded at the instance of any party in interest, as, of course, would be to impose serious delays, involving costs and expenses in the execution of deeds of trusts, which the law never contemplated, and *68without promoting the interests of either creditor or debtor. It is only when the aid of a court of equity is necessary that it ought to be applied for, and it is only in such a case that its aid will be extended. If there are no real impediments in the way of a fair execution of the trust, then its aid is not necessary, and the costs of a lawsuit ought not to be added to the ordinary cost of executing the trust. Muller’s Admr. v. Stone, 84 Va. 834, 6 S. E. 223, 10 Am. St. Rep. 889.
In the light of these well-settled principles, we are of opinion that the lower court, in the' exercise of a sound discretion, should have retained the cause, and had the trust executed under its superintendence and direction. Anderson v. Phlegar, 93 Va. 415, 25 S. E. 107.
The answers admit the alleged alienations of portions of the property, and admit the existence of the liens as alleged. It is denied that the liens mentioned are prior in dignity to the deed of trust, and, so far as the judgment hens are concerned, this, on a motion to dissolve, must be taken as true; the answers being sworn to, and no proof adduced on the subject. The appellees insist that the deed of trust constitutes the first lien upon the several houses and lots upon which mechanics’ liens are admitted to have been taken out. This contention is not sound. The prior incumbrancer has the benefit of his lien upon the land to the extent of its value, exclusive of the buildings or structures placed thereon since the hen was created, and the value of the land is to be ascertained at the time the hens are enforced by the court. Hor can there be any doubt as to the manner whereby it is to be ascertained. It is to be fixed by the court either from evidence submitted directly to it, or through the finding of a commissioner, subject to review by the court, .as in other chancery causes. But the value is to be estimated ■and fixed by the court before the property is sold, and the prior incumbrancer, as to the sum so fixed, is to be preferred in the distribution of the proceeds of sale. This amount, however, is *69all that he can obtain from the proceeds of sale until the mechanics having liens thereon are satisfied. Fidelity, &c. Co. v. Dennis, 93 Va. 504, 25 S. E. 546.
The decree appealed from restrains the trustee from selling the property as a whole. It leaves him, however, with unlimited power to sell the whole property in parcels. It is impossible that the houses and lots upon which the mechanics’ liens rest can be brought to sale, -without sacrifice, until the value of such lots, without the buildings, is ascertained, in order that the prior incumbrancer and the mechanic can know the extent of their respective interests in the subject.
Upon the whole case, we are of opinion that the conditions disclosed by the record make it proper that the appellant should be allowed to file an amended bill, bringing in all necessary additional parties, to the end that the whole matter may be administered under the orders and decrees of the court. That before a sale is ordered an account be taken, showing what parts of the trust subject have been sold, and to whom aliened, with a view to selling the property in the inverse order of its alienation; and that the rights and priorities of the several lien creditors be ascertained and established.
Shortly after the decree of October 5 was entered, dissolving the injunction, the appellant presented another bill, praying for an injunction against the sale until an account was taken. This motion was overruled by a vacation order of October 26, 1901, which is also complained of in the petition for appeal. We have no power, however, to review that action, as no appeal lies to this court from an order refusing an injunction; the remedy in such case being by application to this court to grant the injunction refused. ' Eor the foregoing reasons, the decree appealed from, of October 5, 1901, must be reversed, and the cause remanded to the Circuit Court for further proceedings to be had in accordance with the views expressed in this opinion.
Reversed.