The- appellant leased! to the Jamestown Exposition Excursion and! Steamboat Company a steamship for the period of seven months, beginning the 1st day of May* 190J, at a rental of $9-00 per month, payable monthly, and the lessee also agreed to pay certain charges'- and keep- the vessel in repair. The lease contained a clause that the charterer should furnish a bond in the sum of $2,500 to guarantee the faithful performance of the- contract of leasing; Thereupon the defendant, The Metropolitan Surety Company, executed such bond at the request of the exposition company, which deposited $1/250 as collateral thereto. The bond so furnished bound the principal and surety to pay such sum and secured appellant,, named as *505obligee, from any pecuniary loss restating from the breach of any of the terms, covenants and conditions of the contract of hiring, and further provided that the surety company should he informed of any breach of the terms of such contract within thirty days, and should not be liable for any greater sum than the penalty mentioned in fee bond, nor at all unless proceedings thereon were instituted not.later than the 1st day of January, 1908.
The exposition company breached its contract and the appellant brought suit .against the surety company after the 1st day of January, 1908, and his complaint was dismissed because the action was brought after that date. Thereupon the appellant brought suit against the exposition company, and it being a foreign corporation the plaintiff obtained .an .attachment, and the sheriff attached, as is claimed, the fund which the exposition company had deposited with the surety company on the giving of the bond. Judgment was finally obtained against the .exposition company for $2,951.26, and execution thereon issued to the sheriff, who levied the .attachment, which execution is presumably outstanding.
On January 6, 1909, the .above-entitled action was brought by fee People to dissolve the surety company on the ground feat it was insolvent, and .a temporary receiver was appointed who has since been made permanent receiver, and is now engaged in marshaling fee assets of such corporation, and has in his hands a sum greater than $1,250,
At the time fee surety company gave its bond to the appellant it executed for fee exposition company two other bonds, and fee exposition company demanded and received in cash fifty per cent of the total of those bonds. Breach of these two latter bonds was made, and fee surety company was compelled, to pay a sum greater than the exposition company had placed in its hands on all three of fee bonds which it had given.
The appellant demanded from fee receiver the $1,250 which had been deposited wife the surety company by fee exposition company as collateral security for the bond which had been given, and, upon payment being refused, made a motion to compel such receiver to pay the same over to him. Instead of directing the receiver so to do the court appointed the referee *506to take proof and report. From such order Johnston appeals, claiming that he was entitled to have the money paid over to him as matter of law, and that the reference is a useless and unnecessary expense. .
We are of opinion this would be so except for the fact that the defendant claims to have paid, out $275 of the fund in defending the action which the appellant brought against it, and in which the complaint was dismissed because the action was not brought within the proper time, and also except for the fact that the surety company claims that it holds certain notes of the appellant which are proper offsets to the appellant’s claim.
In view of the fact that we are about to affirm the order directing a.reference, we deem it our duty to give our views with respect to the appellant’s rights in the fund to the end that the reference may be properly confined and as expeditiously terminated as may be.
The contract of suretyship which the surety company entered into was clearly one guaranteeing performance of the contract by the principal, the exposition company, to the appellant, the obligee therein. (Belloni v. Freeborn, 63 N. Y. 383; National Bank of Newburgh v. Bigler, 83 id. 51.) The moneys deposited by the principal with the surety were deposited to secure performance of the contract between the appellant and the exposition company and to provide a fund for payment of the damages occasioned by its breach, and a breach having occurred the law raised an implied trust with respect to the fund in favor of the creditor. Where collateral security is placed by the principal in the hands of his surety to secure performance of a contract or to provide a fund for the payment of damages occasioned by its breach the law raises an implied trust in favor of the creditor which on maturity of his debt he may enforce whether the surety has been damnified or not and irrespective of the question whether the surety or principal or. either is insolvent. (National Bank of Newburgh v. Bigler, supra; Vail v. Foster, 4 N. Y. 312; Crosby v. Crafts, 5 Hun, 327; affd. on opinion below, 69 N. Y. 607; Clark v. Ely, 2 Sandf. Ch. 166; Pratt v. Adams, 7 Paige, 615, 627.) Learned, P. J., in Crosby v. Crafts (supra), in *507applying the rule uses the following language particularly apt to the present situation: “ The ground of that principle is, that the security given by the principal debtor to the surety is a quasi trust fund for the payment of the debt; that the principal debtor has appropriated it for the security of the debt, and that the creditor has an equitable right to have it thus applied. (Vail v. Foster, ut supra.) That case illustrates this view. The surety had become insolvent. But he held a bond and mortgage, executed by the principal debtor to indemnify him for his liability. As he was insolvent and could not pay, he could not practically be damnified by reason of his debt. And as to him the creditor was in the . same condition as if the surety had been discharged by death, instead of insolvency. But although the creditor could not, in fact, collect anything out of the surety, and although for this reason the surety had never been damnified by his obligation, yet it was held that the .creditor was entitled to have the benefit of the securities which had been executed to the surety for his indemnity.”
The .surety company being insolvent and its funds in the custody of a receiver appointed by this court, an action was not necessary, as is urged by the respondent, or even proper. If the court found that its officer held a trust fund belonging to another, it could upon motion compel him to pay it over to the rightful owner. (Riggs v. Whitney, 15 Abb. Pr. 388; Tyler v. Hildreth, 77 Hun, 580.) 17or would it be any answer to the application to say that the receiver did not have the identical money which was deposited as indemnity with the surety company, or even that the surety company had paid it out to discharge its other obligations. The receiver would be compelled to make the fund good from such moneys as had come to his hands. (Standard Oil Co. v. Hawkins, 74 Fed. Rep. 395.) The receiver stands in place of the surety company. It would be no answer by the company to say that it had misappropriated the fund and did not have it on hand, for it would be compelled to make it good. Besides, the general creditors have no right to have the fund swelled by moneys rightfully belonging to another, and it would be a travesty upon justice if the court could not direct its own officer to restore to another a fund to which he was entitled.
*508The .situation is unlike that of an executor -of am executor, for .in that case the last -executor is accountable, -only for such funds .-as came to his hands -belonging to the estate-;of which Ms testator was the -executor.
The appellant, after mafcingisueh deductions as shall be found -proper, is entitled to -relief .irrespective of Ms ¡attachment -or execution, ,-aaad it is unimportant that the proceeding was not instituted in behalf of the ¡sheriff;, as urged- by the respondent.
The .reference ordered would, therefore, be improper except for the fact that the surety company claims to have rightly paid out a portion of the fund delivered to it ami. to have an oEset against some portion of it. A reference is proper to ascertain the facts in this regard, to the end- that the court may -determine whether -ah or part should be paid over to the appellant.
The -order must, therefore,, beaffirmed, but without -costs.
All concurred, except Kellogg, J., dissenting in opinion.