— In an action for a divorce and ancillary relief, Herbert Rubenfeld, *720the former attorney for the plaintiff, appeals from so much of an order of the Supreme Court, Suffolk County (Gowan, J.), dated September 12, 1990, as denied that branch of his cross motion which was to establish the amount of his unpaid legal fee at $7,410, and granted the plaintiff’s motion to the extent of directing him to return $2,500 of a $3,000 retainer fee.
Ordered that the order is reversed insofar as appealed from, without costs or disbursements, and the matter is remitted to the Supreme Court, Suffolk County, for a hearing on that branch of the appellant’s cross motion which requested a determination of his fee and on the plaintiff’s motion for return of the retainer.
The plaintiff retained the appellant to represent her in a matrimonial action and paid a $3,000 retainer which was to be credited towards future charges. Approximately a year and a half later, the plaintiff brought a pro se motion for the return of the retainer, and the appellant moved for permission to withdraw and for a determination that the remaining fee for his services was $7,410. After hearing oral argument on the motions, the court permitted the appellant to withdraw, but rejected his claim for additional fees and directed him to return $2,500 of the retainer to the plaintiff. No issue is raised on appeal as to that portion of the order which permitted the appellant to withdraw from the case.
Where an attorney’s withdrawal from a case is justifiable, the attorney is entitled to recover for services rendered on the basis of quantum meruit and to impose a retaining lien on the file or a charging lien on the proceeds of the judgment (see, Allen v Rivera, 125 AD2d 278; Rosen v Rosen, 97 AD2d 837). If the attorney fails to demonstrate that the withdrawal was justifiable, the right to recover on the basis of quantum meruit is forfeited (see, Allen v Rivera, supra). In the event that the withdrawal is justifiable, a hearing is required to determine the amount of compensation (see, Teichner v W & J Holsteins, 64 NY2d 977; Andreiev v Keller, 168 AD2d 528; Katsaros v Katsaros, 152 AD2d 539) unless the parties consent to a determination of the reasonable value of the attorney’s services on the papers submitted to the court (see, e.g., Theroux v Theroux, 145 AD2d 625).
The court erred in arbitrarily reducing the appellant’s fee to $500 without holding a hearing or stating the reasons for its decision (see, e.g., Gutin v Gutin, 155 AD2d 586). The appellant requested a hearing, and there is no indication in the record that he consented to a determination solely on the papers *721submitted to the court. Accordingly, the matter is remitted to the Supreme Court, Suffolk County, for a hearing to determine whether the appellant’s request to withdraw was justifiable and, if so, to determine the value of the appellant’s services on a quantum meruit basis (see, Teichner v W & J Holsteins, supra; Katsaros v Katsaros, supra). O’Brien, J. P., Copertino, Pizzuto and Santucci, JJ., concur.