
    Scarsdale National Bank and Trust Company, Appellant and Respondent, v. United States Fidelity and Guaranty Company, Respondent and Appellant.
    
      (Argued March 19, 1934;
    decided April 17, 1934.)
    
      James H. Hoffnagle and Alexander M. Crane for plain-, tiff, appellant and respondent.
    The Lien Law (Cons. Laws, ch. 33) plainly contemplates that payments upon public works contracts shall be allocated to him whose labor, material or money was used for that particular part of the contract. (Schaghticoke Powder Co. v. G. & J. Ry. Co., 183 N. Y. 306; Giant Portland Cement Co. v. State, 232 N. Y. 395; Anderson v. Hayes Constr. Co., 243 N. Y. 140.) Earned moneys presently payable should go to the assignee bank whose advances earned the funds, and this principle should logically be extended to include all earned moneys. (Arrow Iron Works, Inc., v. Greene, 260 N. Y. 330; Anderson v. Hayes Constr. Co., 243 N. Y. 140; American Radiator Co. v. City of New York, 223 N. Y. 193; Foshay v. Robinson, 137 N. Y. 134; Laski v. State, 217 App. Div. 420; 246 N. Y. 569.)
    
      Henry E. Stohldrier and Walter W. Westall for defendant, respondent and appellant.
    The surety company’s right of subrogation attaches immediately upon the filing of its bond guaranteeing performance. (Exchange State Bank v. Federal Surety Co., 28 Fed. Rep. [2d] 485.) The surety is first entitled to recoup any losses sustained from retained percentages and money earned before an assignee is entitled to participation. (Prairie State Bank v. United States, 164 U. S. 227; Arrow Iron Works, Inc., v. Greene, 260 N. Y. 330; Maryland Casualty Co. v. Board of Water Commissioners, 66 Fed. Rep. [2d] 730.)
   Crane, J.

On December 2, 1930, the Cook Contracting Company, a partnership, entered into a contract with the Parkway Commission, as a representative of the State, for the construction of a portion of a road in Westchester county. On December 8, 1930, the defendant executed a bond, as surety, to the State, in the sum of $179,000, guaranteeing the completion of the contract by the Cook Contracting Company. Four months later, and ■ on April 8, 1931, the Cook Contracting Company executed an assignment of all moneys due and to become due, under the contract, to the plaintiff. On July 10, 1931, the Cook Contracting Company defaulted on its contract, and on July 28, 1931, the State called upon the defendant, as surety, to complete the contract. At the time of the default the contractor had earned, in addition to the moneys theretofore paid to the assignee, the sum of $10,746.29. The State, through the Comptroller, also had in its possession retained percentages amounting to $3,092.86.

The defendant, pursuant to the demand of the State, completed the contract at a loss of $55,783.59. Is the assignee, the plaintiff, or the bonding company¿ the defendant, entitled to this sum of $10,746.29, the money earned at the time of the default? The courts below have awarded to the defendant the retained percentages, but the Appellate Division, reversing the Special Term, has given the earned moneys to the plaintiff.

The plaintiff, as assignee, could not receive any more money than the contractor was entitled to. In other words, the assignment carried with it all his rights, but nothing more. The contractor and the assignee were both bound by the terms of the contract. The contract entered into between the State and the contractor specifically sets forth by its terms the rights of the parties in the event of a default. It states as follows:

“ Article XXII. If the work to be done under this contract shall be abandoned by the contractor * * * the commission shall thereupon have the power to complete or contract for the completion of the work * * *. The expenses, losses or damages so charged shall in addition to any other indemnification provided for elsewhere in this contract, be deducted and paid by the commission out of such moneys as may be due or may at any time thereafter grow due to the contractor under and by virtue of this contract, or any part thereof.”

After July 10, 1931, when the Cook Contracting Company defaulted, the State could have completed the work and retained all money due to the contractor at the time of the default and apply it to the cost of completion. The deficiency, or loss sustained by the State, would have been an obligation of the bonding company and could have been collected from it by the State. Under these circumstances the assignee would not have been entitled to this sum of $10,746.29. It had no better rights under the contract than the contractor and, if the State, as against the contractor, could apply these earned moneys to the cost of completion, it could do the same thing as against the assignee. In other words, the moneys due at the time of the default, called the earned moneys, could and would be applied by the State in reducing the amount due on the defendant’s bond.

Does it make any difference in the application of these earned moneys that the surety company complied with the demand of the State and completed the job at its own expense? Upon what principle, or, according to what reasoning, would the earned moneys in one instance inure to the benefit of the defendant and not in the other? The answer attempted to be made is, that the assigneebank’s money went into the work and left just so much less to be completed.

The same answer could be made to the State’s claim to the money, had it finished the work. The unsoundness of this answer is apparent when we remember that the bank, or assignee, is bound by the contract with the State and has no superior rights to those given under the contract to the contractor. It is this contract which provides that the State may apply the earned moneys to the cost of completing the work after default. The bank, assignee, takes its assignment subject to this right. Therefore, it is no answer to say as against the State that the money of the bank went into the work and thus reduced the cost of completion. Of course it did, and it became entitled to all moneys due to the contractor at the time of the default, subject to the superior right of the State by its contract with the contractor to apply all earned moneys to the cost of completion.

The bonding company succeeded to all these rights of the .State, under the principle of subrogation. Having completed the work in behalf of the State, it was subrogated to all the rights of the State as against the contractor. This was not a right given to it by the judgment of the court, or arising at the time of the default. It was implicit in its undertaking and agreement with the State. This equitable right of subrogation was created on December 8, 1930, at the time the defendant executed its bond as surety to the State months before the assignment to the bank. The bond was linked up to the contractor’s contract. The performance, which was guaranteed, was the performance of this contract, which had in it the right of the State to apply earned moneys toward completion. Probably the same rights would have existed if article XXII, above quoted, had not been in the contract. However, we are here dealing with the contract which contained the right to retain earned moneys and apply them on the cost of any completed work. To all rights under this contract the bonding company was subrogated. The equity in favor of the surety company arose at the time of the giving of its bond. The right became available when the surety company' completed the work at a loss. (Prairie State Bank v. United States, 164 U. S. 227, at pp. 232, 237, 240.) The equitable lien arose at the time of the execution of the bond and was thus superior to the assignment. (Exchange State Bank v. Federal Surety Co., 28 Fed. Rep. [2d] 485, 488.) This is the reasoning and the rule adopted by the weight of authority. (Maryland Casualty Co. v. Board of Water Comrs., 66 Fed. Rep. [2d] 730, and Lacy v. Maryland Casualty Co., 32 Fed. Rep. [2d] 48; as well as the case of Prairie State Bank v. United States, 164 U. S. 227; Henningsen v. U. S. Fidelity & Guarantee Co., 208 U. S. 404; Hardaway v. National Surety Co., 211 U. S. 552.) We held nothing to the contrary in Arrow Iron Works, Inc., v. Greene (260 N. Y. 330) and Laski v. State (217 App. Div. 420; affd., 246 N. Y. 569).

' For these reasons the judgment of the Appellate Division should be reversed and that of the Special Term affirmed, without costs in this court and in the Appellate Division.

Pound, Ch. J., Lehman, O’Brien, Hubbs and Crouch, JJ., concur; Kellogg, J., not sitting.

Judgment accordingly.  