Rule 41. Dismissal of actions.
(a) Voluntary dismissal; effect thereof.
(a)(1) By plaintiff. Subject to the provisions of Rule 23(e) and of any applicable statute, an action may be dismissed by the plaintiff without order of court by filing a notice of dismissal at any time before service by the adverse party of an answer or other response to the complaint permitted under these rules. Unless otherwise stated in the notice of dismissal, the dismissal is without prejudice, except that a notice of dismissal operates as an adjudication upon the merits when filed by a plaintiff who has once dismissed in any court of the United States or of any state an action based on or including the same claim.
(a)(2) By order of court. Unless the plaintiff timely files a notice of dismissal under paragraph (1) of this subdivision of this rule, an action may only be dismissed at the request of the plaintiff on order of the court based either on:
(a)(2)(i) a stipulation of all of the parties who have appeared in the action; or
(a)(2)(ii) 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 of the plaintiff's motion to dismiss, the action shall not be dismissed against the defendant's objection unless the counterclaim can remain pending for independent adjudication by the court. Unless otherwise specified in the order, a dismissal under this paragraph is without prejudice.
(b) Involuntary dismissal; effect thereof. For failure of the plaintiff to prosecute or to comply with these rules or any order of court, a defendant may move for dismissal of an action or of any claim against him. After the plaintiff, in an action tried by the court without a jury, has completed the presentation of his evidence the defendant, without waiving his right to offer evidence in the event the motion is not granted, may move for a dismissal on the ground that upon the facts and the law the plaintiff has shown no right to relief. The court as trier of the facts may then determine them and render judgment against the plaintiff or may decline to render any judgment until the close of all the evidence. If the court renders judgment on the merits against the plaintiff, the court shall make findings as provided in Rule 52(a). Unless the court in its order for dismissal otherwise specifies, a dismissal under this subdivision and any dismissal not provided for in this rule, other than a dismissal for lack of jurisdiction or for improper venue or for lack of an indispensable party, operates as an adjudication upon the merits.
(c) Dismissal of counterclaim, cross-claim, or third-party claim. The provisions of this rule apply to the dismissal of any counterclaim, cross-claim, or third-party claim. A voluntary dismissal by the claimant alone pursuant to Paragraph (1) of Subdivision (a) of this rule shall be made before a responsive pleading is served or, if there is none, before the introduction of evidence at the trial or hearing.
(d) Costs of previously-dismissed action. If a plaintiff who has once dismissed an action in any court commences an action based upon or including the same claim against the same defendant, the court may make such order for the payment of costs of the action previously dismissed as it may deem proper and may stay the proceedings in the action until the plaintiff has complied with the order.
(e) Bond or undertaking to be delivered to adverse party. Should a party dismiss his complaint, counterclaim, cross-claim, or third-party claim, pursuant to Subdivision (a)(1)(i) above, after a provisional remedy has been allowed such party, the bond or undertaking filed in support of such provisional remedy must thereupon be delivered by the court to the adverse party against whom such provisional remedy was obtained.