*920In an action, inter alia, to recover damages for breach of contract, the plaintiff appeals (1), as limited by his brief, from so much of an order of the Supreme Court, Westchester County (Donovan, J.), dated February 15, 2008, as, sua sponte, imposed a sanction upon him in the sum of $1,500, in effect, pursuant to 22 NYCRR 130-1.1, based upon his filing of a motion to hold the defendants in contempt, (2) from an order of the same court entered February 20, 2008, which granted that branch of the defendants’ motion which was for an award of costs, including an attorney’s fee, incurred in opposing his motion to hold the defendants in contempt, and directed him to pay costs, including an attorney’s fee, to the defendants in the principal sum of $9,933, and (3) from a judgment of the same court entered March 28, 2008, which, upon the order entered February 20, 2008, is in favor of the defendants and against him in the principal sum of $9,933.
Ordered that on the Court’s own motion, the notice of appeal from the order dated February 15, 2008, is deemed to be an application for leave to appeal from so much of the order as, sua sponte, imposed a sanction upon the plaintiff in the sum of $1,500, and leave to appeal is granted (see CPLR 5701 [c]); and it is further,
Ordered that the order dated February 15, 2008, is affirmed insofar as appealed from; and it is further,
Ordered that the appeal from the order entered February 20, 2008, is dismissed; and it is further,
Ordered that the judgment is affirmed; and it is further,
Ordered that one bill of costs is awarded to the defendants.
The appeal from the intermediate order entered February 20, 2008, must be dismissed because the right of direct appeal therefrom terminated with the entry of judgment in the action (see Matter of Aho, 39 NY2d 241, 248 [1976]). The issues raised on appeal from the order entered February 20, 2008, are brought up for review and have been considered on the appeal from the judgment (see CPLR 5501 [a] [1]).
“A court may sua sponte impose sanctions against an attorney or a party to the litigation, or against both, but the attorney or party to be sanctioned must be afforded a reasonable opportunity to be heard” (Kamen v Diaz-Kamen, 40 AD3d 937, 937 [2007]; see 22 NYCRR 130-1.1 [a], [d]; Matter of Griffin v Panzarin, 305 AD2d 601, 603 [2003]; Kelleher v Mt. Kisco Med. Group, 264 AD2d 760, 761 [1999]; Morrison v Morrison, 246 AD2d 634 [1998]). Conduct during litigation is frivolous and *921subject to sanction and/or the award of costs under 22 NYCRR 130-1.1 “if it is completely without merit in law and cannot be supported by a reasonable argument for an extension, modification or reversal of existing law or . . . it is undertaken primarily to delay or prolong the resolution of the litigation, or to harass or maliciously injure another” (Astrada v Archer, 71 AD3d 803, 807 [2010] [internal quotation marks omitted]; see Greene v Doral Conference Ctr. Assoc., 18 AD3d 429, 431 [2005]; Tyree Bros. Envtl. Servs. v Ferguson Propeller, 247 AD2d 376, 377 [1998]).
Applying these principles to the matter at bar, the Supreme Court providently exercised its discretion in, sua sponte, imposing a sanction upon the plaintiff, and additionally granting that branch of the defendants’ subsequent motion which was for an award of costs, including an attorney’s fee. Following oral and written warnings to the plaintiff that sanctions may be imposed for frivolous conduct if the plaintiff continued prosecution of the contempt proceeding, the Supreme Court presided over a contempt hearing at which the plaintiff was afforded a reasonable opportunity to be heard, and was permitted to cross-examine witnesses (see Kamen v Diaz-Kamen, 40 AD3d at 937; cf. Matter of Griffin v Panzarin, 305 AD2d at 603).
The plaintiffs claim that the defendants violated a prior court order with respect to, inter alia, their alleged interference with booking a cruise on a ship was “completely without merit” and could not be supported by any “reasonable argument” or existing law (see Matter of Tercjak v Tercjak, 49 AD3d 773, 773-774 [2008]; Kucker v Kaminsky & Rich, 7 AD3d 491, 492 [2004]).
Accordingly, the Supreme Court providently exercised its discretion in imposing costs, including an award of a reasonable attorney’s fee, as well as a sanction upon the plaintiff (see Astrada v Archer, 71 AD3d at 803; Kamen v Diaz-Kamen, 40 AD3d at 937-938). Dillon, J.P., Balkin, Belen and Lott, JJ., concur.