This is an action to foreclose a mechanic’s lien and the city of New York is a party defendant. The jurisdiction of the City Court has been sustained on two grounds: First, that section 42 of the Lien Law confers jurisdiction upon that court; and second, that, although the City Court has no jurisdiction of a case in which the city of New York is a party defendant, it has jurisdiction in an action where the relief demanded in the complaint is not against the city but against defendants to the extent of the fund in the possession of the city. Section 42 of the Lien Law provides: “A lien for labor done or materials furnished for a public improvement may be enforced against the funds of the state or the municipal corporation for which such public improvement is constructed, to the extent prescribed in article two of this chapter, and against the contractor or sub-contractor liable for the debt, by a civil action, in the same court and in the same manner as a mechanic’s lien on real property. ’ ’ This action undoubtedly extends the jurisdiction of certain courts of limited jurisdiction as to the subject matter of the action. But it cannot be held to repeal a limitation, as to parties, imposed upon one of the courts of that class.
It is not necessary to discuss the various phases in which the question of lack of jurisdiction of the City *393Court in actions in which the city of New York is a party defendant has been presented and discussed by the courts. Callahan v. Mayor, 66 N. Y. 656; O’Connor v. City of New York, 51 Misc. Rep. 560; 120 App. Div. 875; 191 N. Y. 238. It is settled that since the passage of chapter 379 of the Laws of 1860 the City Court of the city of New York, and its predecessor the Marine Court, has not had jurisdiction of an action or special proceeding wherein the city of New York was a party defendant. The city of New York is a party defendant to this action and presumptively a necessary party defendant. Section 60 of the Lien Law provides that in such an action if the court -finds the lien is established it should render judgment directing the state or municipal corporation to pay to the lienors so much of the ‘ ‘ funds or money which may be due from the state or municipal corporation to the contractor, as will satisfy such liens, with interest and costs, not exceeding the amount due to the contractor.” The very foundation of the action is the existence of a fund due the contractor from the city upon the contract. This may require the court to adjudicate a dispute between the city and the contractor as to whether there is a fund so due, and to ascertain the amount thereof and to direct the payment out of the. fund by the state or municipality. Although the lien may have been bonded it is still necessary to establish a valid lien upon the primary fund to require payment pursuant to the terms of the undertaking. Berger Mfg. Co. v. City of New York, 206 N. Y. 24, 31. It may be that ordinarily in actions of this character the amount due is conceded, and has been paid over voluntarily upon the filing of the bond and the discharge of the lien, and hence it is not necessary in such cases to make the city a party defendant. Hawkins v. MapesReeve Construction Co., 82 App. Div. 72, 80; Maneely *394v. City of New York, 119 id. 376, 393. But the plaintiff has made the city a party defendant, and. as we have seen the city may be a necessary and material party to the action. Having made the city a party defendant he has brought his action in a court without jurisdiction to try his case.
The order will be reversed with ten dollars costs and disbursements and judgment directed to be entered for the defendants dismissing the complaint with costs.
Guy and Gerard, JJ., concur.
Order reversed.