We have heretofore held that the costs recovered in an action belong to the attorney, without any assignment; and that the claim of the attorney thereto is superior to the right of the adverse party in the action to set off claims against the successful party. Delaney v. Miller, 84 Hun, 244, 32 N. Y. Supp. 505. A distinction is sought to be made between an attorney for a plaintiff and an attorney for a defendant, where no counterclaim is contained in the answer. And it is claimed that under section 66 of the Code of Procedure attorneys for defendant only have liens for costs, or are entitled thereto, when the answer contains a counterclaim. Section 66 was not intended as a limitation upon liens of attorneys for their costs, but as an extension; it was intended as an additional security to them. By it the lien is made to attach to the cause of action, whether that cause of action is set forth in a complaint or in an answer by way of counterclaim; and it attaches just as soon as it is asserted,—in the case of a plaintiff’s attorney, when the summons is served; in the case of a defendant’s attorney, when the answer is served, if it contains a counterclaim. The only change in the law effected by the section is to give attorneys liens upon causes of action before they are perfected into judgments. Obviously, an attorney for a defendant who has no cause of action to assert gets no benefit under the section, and therein is the only difference between liens for plaintiffs’ and defendants’ attorneys; it is a difference that only obtains before judgment.
The cases of Pierson v. Safford, 30 Hun, 521, and Levis v. Burke, 51 Hun, 71,1 referred to to sustain the claim that attorneys for defendants who have not pleaded counterclaims have no liens for costs, are both cases arising upon settlements made before judgments obtained, without paying the attorneys for their services, and, there being no counterclaims, there was nothing to which the liens could attach; and therefore the court held in each case that it did not come under the provisions of section 66, and the attorney could get no relief at its hands. Here a judgment has been obtained by the defendant for costs. The lien of his attorney attaches upon its rendition. Unlike the cases of Pierson v. Safford and Levis v. Burke, there is here something in existence, upon *1081which, or to obtain which, the attorney has exercised his skill and spent his labor, and upon which the court can act to protect him. “It has long been settled that an attorney has a lien for his costs and compensation upon the judgment recovered by him.” Marshall v. Much, 51 N. Y. 140. It makes no difference whether the attorney is attorney for a plaintiff or for a defendant. These views lead to a reversal of the order appealed from. Order reversed, with costs and disbursements.