THAYER, Circuit Judge,
after stating the case as aboye, delivered the opinion of the court.
The appellants contend that the order made by the circuit court in the foreclosure suit, directing thé payment of the intervener’s claim, should be reversed for three principal reasons: First, because the claim is not of a preferential character, and is not entitled to payment prior to the indebtedness of the railway company evidenced by its mortgage bonds; second, because the intervener, by bringing a suit to collect his claim in the supreme court of the state of New York, waived his right to a preference, and voluntarily elected to place himself in the position of an ordinary judgment creditor; third, because the trial court erred in refusing to allow the appellants to recoup the damages which the railway company had sustained, in consequence of an alleged failure on the part of the Midvale Steel Company to malee and deliver the gear wheel and pinion within the time stipulated in its contract. These propositions will be considered in the order above stated.
With respect to the first, we-are of opinion that the intervener’s demand falls within the category of claims which have been generally recognized as of a preferential character, and equitably entitled to be paid in advance of the claims of mortgage bondholders. The gear wheel which was supplied by the Midvale Steel Company to the mortgagor company — that is to say, to the Denver City Cable Railway Company — was an important and essential part of its plant, without which the railway company could neither discharge its duties to the public, nor realize an income by the use of the mortgaged prop*271etly. It was necessary for the railway company to- purchase a new gear wheel and pinion, in order that its cable road might be kept in operation, and that tlie company might preserve its franchises, and remain a going concern. The machinery in question enhanced the value of the mortgaged property by as much as such machinery was fairly worth in the market. It was delivered on May 19,1893, less than six months before receivers were appointed, at tbe instance of a stock-bolder or creditor of the railway company; and the order appointing such receivers made it their duty to pay all demands of the class to which the intervener's claim belongs, out of the current revenues and earnings of the property which was placed in their charge and under their control for the purpose of being preserved and operated. .\'o exception appears to have been taken to the order of appointment: under which the duty last aforesaid was imposed on the receivers. Mox-eover, the testimony contained in the record discloses the following significant facts: That on July 1, 1893, $107,430 was paid as interest to mortgage bondholders avIio held bonds secured by the first and second mortgages which had been executed by the railway company, and that the money to pay this installment of interest was raised by the railway company by issuing its notes, and securing the same by a third mortgage on all of its property, which latter mort gage was executed on or about June 1, 1893. It thus appears that within less than 30 days after the gear wheel and pinion had been delivered by the Midvale Steel Company, and placed in operation, the railway company moil gaged the property so acquired, along with its other property, and used the proceeds of the mortgage to meet its interest obligations to the first and second mortgage bondholders. In view of these facts, we think, as before stated, that the intervener’s claim was of such a nature that a court of equity having in charge the administration of the fund realized by tbe sale of the mortgaged property was fully justified in according it a preference, and in directing its payment before any distribution of the proceeds of the sale was made among the mortgage bondholders. The circumstances under which the indebtedness in controversy was contracted were such as to bring the case fully within the doctrine Avhich was stated by this court, after a full review of all the decisions, in Trust Co. v. Riley, 36 U. S. App. 100, 16 C. C. A. 610, and 70 Fed. 32, namely, that, in a suit brought to foreclose a mortgage lien upon the property of a quasi public corporation, it is competent for a court of equity to award a preference to a claim for property supplied or services rendered to such corporation, when it appears iliat the property so supplied or the services rendered were necessary to enable the company to discharge its public obligations, and remain a going concern, and when it is evident that the property or services in question enhanced the value of the mortgaged property, and thereby inured to the benefit of the mortgagees. The facts disclosed by the present record, and the facts which were conceded by counsel in argument, bring the case at bar clearly within the rule above stated, to say nothing of the other circumstance to which we have already alluded, that the machinery which was furnished to the mortgagor company aves hypothecated by it very soou after it was acquired, to raise money wherewith to pay interest to *272mortgage bondholders, most of which interest had accrued before the machinery was furnished. This circumstance alone would seem to render it just and equitable that the intervener’s right to a preference should be upheld.
We are also unable to assent to the further proposition, stated above, that the intervener waived his right to a preference, and voluntarily elected to rely upon the credit of the railway company by suing that company in the courts of New York. The suit in New York was begun on August 17, 1893, before receivers of the railway company had been appointed by the circuit court of the United States for the District of Colorado. In bringing that suit, the intervener pursued the only course that was at the time open to him for the collection of his claim, and he was under no legal obligation to dismiss that action when receivers of the property of the railway company were subsequently appointed in Colorado, inasmuch as the order of ajjpointment contemplated the further prosecution of pending suits in other jurisdictions, by expressly authorizing the 'receivers to intervene in the defense of any such suits against the railway company as were then pending and undetermined. We are unable to perceive any just or reasonable ground upon which it can be held that, because the intervener prosecuted the suit in New York to final judgment, he thereby relinquished his equitable right to insist upon a preference as against the mortgage bondholders. The recovery of the judgment did not alter the inherent character of his claim, nor extinguish his equity, nor operate to the prejudice of other creditors of the railway company. We are of opinion, therefore, that the intervener retained the same right after the recovery of the judgment as before, to insist that in the forum of equity, and in the distribution of the proceeds of the sale of the mortgaged property, his demand should be preferred over the claims of the mortgage creditors.
A more doubtful question than either of those heretofore decided is whether the trial court erred in refusing to allow the appellants to show that the Midvale Steel Company had failed to deliver the gear wheel and pinion to the railway company within the time specified in its contract, and that, in consequence of such default, the railway company had sustained a large loss, for which the Midvalé Steel Company was justly accountable. ' The record shows that a counterclaim, founded upon an alleged failure of the Midvale Steel Company to comply with its contract in the respect last stated, was interposed by the railway company in the suit which was instituted by the intervener in the supreme court of New York. It further shows that said action was sent to a referee for trial, and that the referee reported that the defendant company had produced no proofs in support of its counterclaim, for which reason no finding was made thereon by the referee. It furthermore appears that the intervener took no steps to malee the receivers of the railway company parties to said action, and that the receivers failed to enter their appearance therein, and that the judgment which was eventually entered on the referee’s report was a judgment against the railway company alone. It is manifest, therefore, that there has been no actual trial of the issue touching the alleged breach of contract, and the question to be decided is *273whether the trial court should have granted the appellants a hearing upon that issue. We may concede for present purposes that if the record in the New York suit showed that the merits of the alleged counterclaim had been investigated and determined in that suit, or even if it was silent oil that subject, no furl her trial of that issue could be permitted; bul, inasmuch as the New York record shows a llii-inalively that the issue with respect to the nondelivery of the gear wheel within ihe .hue limited was not in fact tried and determined, we are of opinion that it is a proper subject tor consideration in the prese.11 proceeding. We rest our conclusion on this point, not altogether on ihe ground last indicated, but upon the principle that one who seeks relief purely upon equitable grounds should himself do what is equitable. In the present proceeding the intervener interposes a claim against the proceeds of the mortgaged property, and insists that it shall be paid prior to the mortgage indebtedness, not, however, because he has a lien ujwn the mortgaged property such as a court of law would recognize and enforce, but because of the circumstances under which certain machinery was supplied to the railway company. The intervener himself has no standing in court to maintain his claim to a. preference without going behind the New York judgment, and showing the origin and nature of the demand on which the judgment rests. When, therefore, he invites an investigation of those questions for the purpose of establishing an equitable right to which the judgment alone would not entitle him, we think that the mortgage bondholders should be permitted to show, if they can, that they were not benefited to the extent of the full value of the machinery which was supplied to the railway company, bur rhat, by reason of the failure to deliver the same within the contract period, the company sustained some loss. In die case of Brownsville v. Loague, 129 U. S. 493, 505, 9 Sup. Ct. 327, where the relator in a mandamus proceeding was compelled to go behind ibis judgment for the purpose of establishing ids right to a levy of .taxes to pay the same, and it appeared on such investigation that the bonds on which the judgment was obtained were issued without authority of law, it was held that the respondents could avail themselves of the fact thus developed, and a writ of mandamus was accordingly denied. We think that the principle which underlies that decision is applicable to tiie case; in hand, and that it jxislifies an inquiry in Ibis proceeding whether the intervener’s demand ought not to be redxiced in amount because of the alleged failure of the Midvale Steel Company to deliver the gear wheel and pinion within the contract period. It results from this view that the decree of the circuit court from which the appeal was taken must be reversed. The case is accordingly remanded to that court, with directions to cause an investigation, such as is above indicated, to be made, and to deduct from the amount of the intervener’s claim such damages, if any, as it may appear that the Denver City Cable Itailway Company sustained by the failure of the steel company to deliver the gear wheel and pinion within the contract period.