The costs when recovered belong to the party to whom adjudged, not to his attorney. The allowance of costs is to the prevailing party by way of indemnity for expenses in the action (Code, § 303). Prior to the Code, the courts had, by. long current of decision, recognized and upheld the lien of the attorney upon the judgment recovered by his client, for services and expenses in the action (Ward v. Wordsworth, 1 E. D. Smith, 598).
The Code has not disturbed this lien. It still exists to protect the attorney for his trouble, labor and skill in the action (Rooney v. Second Ave. R. R. Co., 18 N. Y., 368). And in McGregor v. Comstock, 28 N. Y., 240, it was held that when the judgment was solely for costs, the lien of the attorney extended to the amount of the recovery.
But the question raised by this motion is, whether this lien in favor of the attorney is superior to the right of the defendant to set off his judgment for costs against the plaintiff’s judgment. If it is not, the lien in favor of the attorney is of no avail, to the extent, at least, of the amount of the judgment in the defendant’s favor.
Whenever the right of set-off is sought to be enforced by action brought for the purpose, the lien of the attorney must yield to the statutory right of set-off. The court has no discretion, but must enforce the legal right.
It was so decided in the court of errors, in Nicoll v. *68Nicoll, 16 Wend., 446. Mr. Justice Cower in that case said. ‘‘lío authority can be produced where the- attorney’s lien was ever recognized on a trial at law as barring a set-off, the right to which would otherwise be perfect.” On a motion made for the purpose, the rule, however, is otherwise. Such case is without the statute. The power of the court exercised on motion is equitable, not legal,, and rests in discretion (Smith v. Lowden, 1 Sandf., 696; Gihon v. Fryatt, 2 Id., 637.
This application, therefore, is addressed to the sound judgment of the court, to be granted or allowed as it may determine.
In this case the judgment in favor of the plaintiffs is for costs only. This court has determined by repeated adjudications that it would uphold the lien of the attorney whenever it could be done without infringing upon the statute of set-off. And when the judgment is for costs only, the reason for maintaining the lien is eminently just (Sweet v. Bartlett, 4 Sandf., 663, opinion by Oakley, J.).
It appears by affidavit that the attorneys" for the plaintiff themselves had borne a portion of the expenses incident to resisting the proceedings instituted by the defendant on the undertaking to recover damages, and that the plaintiffs had not paid them for the services rendered, nor for the moneys expended, and they .claim a lien on the judgment for costs for their services and expenses.
This seems to be a case in which the lien of the at-' torney should be upheld, and the motion to set off is denied, without costs.
Motion denied.