Short answer. You may move to dismiss, but if the defendant's counterclaim was pleaded before your motion was served, the dismissal only covers your complaint. The defendant may then pursue that counterclaim in a separate action, unless within fifteen calendar days he or she instead chooses to have it resolved in the same case.

What the law says

a complaint shall not be dismissed at the plaintiff's instance save upon approval of the court and upon such terms and conditions as the court deems proper. If a counterclaim has been pleaded by a defendant prior to the service upon him or her of the plaintiff's motion for dismissal, the dismissal shall be limited to the complaint. The dismissal shall be without prejudice to the right of the defendant to prosecute his or her counterclaim in a separate action unless within fifteen calendar days from notice of the motion he or she manifests his or her preference to have his or her counterclaim resolved in the same action.

Rule 16, Section 2 — Dismissal upon motion of plaintiff. Read the full provision →

Dismissal at the plaintiff's instance still needs court approval

This particular mode of dismissal is not treated as automatic even when it is the plaintiff who genuinely wants it. A complaint shall not be dismissed at the plaintiff's own instance save upon approval of the court, and upon such terms and conditions as the court itself deems proper under the circumstances — the plaintiff's own personal wish to withdraw the case does not, by itself alone, simply end it right there.

What happens when a counterclaim is already on file

If the defendant has already pleaded a counterclaim before actually being served with the plaintiff's motion for dismissal, the practical effect of that dismissal narrows considerably: it becomes limited strictly to the complaint alone. The defendant's own counterclaim survives the plaintiff's attempted withdrawal from the case entirely intact, continuing on regardless of what happens to the original complaint, and regardless of whether the plaintiff wanted the entire case, counterclaim included, to simply go away.

The defendant's choice about where the counterclaim proceeds

The dismissal of the complaint is, as a default matter, without prejudice to the defendant's own right to prosecute that counterclaim in a wholly separate action — that outcome is simply the default rule that applies. But the defendant is not necessarily stuck with that particular default outcome: within fifteen calendar days from notice of the dismissal motion, the defendant may instead affirmatively manifest a preference to have the counterclaim resolved right there in that very same original action, keeping everything consolidated in one single case.

Additional protections for class suits

This same section also protects certain other categories of cases from simply being ended unilaterally at one party's whim — a class suit specifically shall not be dismissed or compromised without the approval of the court, echoing the very same underlying theme running throughout this provision: a plaintiff's own unilateral decision to end a case is never, by itself, treated as the final word once other genuine interests, like a defendant's pending counterclaim or an entire class's collective stake, become involved in the outcome.

Related provisions

Note. Statute text quoted on this page is reproduced from the official enactment and is linked to the full provision. The explanation around it is general legal information from Vivas & Nobles Law Office, not legal advice. Whether it applies to your situation depends on facts only a lawyer reviewing them can assess.