
567 N.W.2d 456 (1997)
223 Mich. App. 559
ABB PAINT FINISHING, INC., f/k/a ABB Flakt, Inc., f/k/a Flakt, Inc., Plaintiff-Appellee,
v.
NATIONAL UNION FIRE INSURANCE COMPANY OF PITTSBURGH, PA, Defendant-Appellant.
Docket No. 192855.
Court of Appeals of Michigan.
Submitted February 4, 1997, at Lansing.
Decided May 16, 1997, at 9:35 a.m.
Released for Publication August 22, 1997.
*457 Sallen Sallen Seymour and Sallen by Robert V. Seymour, Southfield, and Saxe Eustace & Vita by Tracy Alan Saxe and Jeffrey J. Vita, New Haven, CT, for Plaintiff-Appellant.
Davis and Fajen, P.C. by James A. Fajen and Nelson P. Miller, Ann Arbor, for Defendant-Appellant.
Before O'CONNELL, P.J., and MARKMAN and M.J. TALBOT [*], JJ.
MICHAEL J. TALBOT, Circuit Judge.
Plaintiff manufactures painting equipment. This suit arises out of an action brought in the federal district court against plaintiff for damages arising out of a painting system it had supplied. In the course of that suit, plaintiff apparently violated a court order and was found to be in contempt. The federal district court indicated that plaintiff would have to pay a fine to purge its contempt. Apparently, the amount of the fine has not yet been determined.
On November 4, 1994, plaintiff filed this action in the circuit court in an attempt to require defendant, plaintiff's general liability insurer, to pay the contempt fine. On October 27, 1995, defendant filed a motion for summary disposition pursuant to MCR 2.116(C)(8). In December, while defendant's motion was pending, plaintiff filed another suit in the federal district court. This new federal action contained a claim identical to the circuit court claim, along with additional claims. Plaintiff then filed a motion for voluntary dismissal in the circuit court.
On January 3, 1996, the trial court heard both defendant's motion for summary disposition pursuant to MCR 2.116(C)(8) and plaintiff's motion for voluntary dismissal. The trial court granted both motions without prejudice. Defendant refused to stipulate an order, arguing that summary disposition under C(8) should be with prejudice. Despite defendant's objections, the trial court entered an order granting both motions without prejudice. Defendant appeals, arguing that a grant of summary disposition under MCR 2.116(C)(8) must necessarily be with prejudice.
Proper resolution of this appeal requires an understanding of MCR 2.116(C)(8). This court rule allows the court to grant summary disposition where "[t]he opposing party has failed to state a claim on which relief can be granted." MCR 2.116(C)(8). "A motion for summary disposition brought pursuant to MCR 2.116(C)(8) tests the legal sufficiency of the plaintiff's complaint and should be granted only if the claims are so clearly unenforceable as a matter of law that no factual development could possibly justify recovery." Int'l Brotherhood of Electrical Workers, Local 58 v. McNulty, 214 Mich.App. 437, 443-444, 543 N.W.2d 25 (1995). Where a motion is brought under C(8), the trial court should liberally permit the parties to amend their pleadings unless amendment "would not be justified." MCR 2.116(I)(5).
The question whether a motion for summary disposition under C(8) should be granted with or without prejudice has rarely been addressed in Michigan. This Court has affirmed a number of cases where a C(8) motion was granted with prejudice but did not *458 comment on this question. See Kauffman v. Shefman, 169 Mich.App. 829, 831, 426 N.W.2d 819 (1988); Smith v. Pontiac, 169 Mich.App. 559, 561, 426 N.W.2d 704 (1988); Simonds v. Tibbitts, 165 Mich.App. 480, 481, 419 N.W.2d 5 (1987). In the only case in which this issue was expressly addressed, Gardner v. Stodgel, 175 Mich.App. 241, 437 N.W.2d 276 (1989), this Court held that a motion for summary disposition under MCR 2.116(C)(8) was properly granted with prejudice on the basis of the facts of that case. Gardner, supra at 251, 437 N.W.2d 276. Unfortunately, this Court gave no insight into its reasoning in Gardner.[1]
The decision whether to grant dismissal with or without prejudice, by definition, determines whether a party may refile a claim or whether the claim is permanently barred. Thomas v. Michigan Employment Security Comm., 154 Mich.App. 736, 742, 398 N.W.2d 514 (1986). Thus, in deciding whether dismissal should be with or without prejudice, the trial court should consider whether the doctrine of res judicata would bar subsequent actions involving the same claim. "The doctrine of res judicata is a manifestation of the recognition that interminable litigation leads to vexation, confusion, and chaos for the litigants, resulting in the inefficient use of judicial time." Schwartz v. Flint, 187 Mich.App. 191, 194, 466 N.W.2d 357 (1991). "For [res judicata] to apply, (1) there must have been a prior decision on the merits, (2) the issues must have been resolved in the first action, and (3) both actions must be between the same parties or their privies." Moore v. Wicks, 184 Mich.App. 517, 519-520, 458 N.W.2d 653 (1990). Where a trial court dismisses a case on the merits, the plaintiff should not be allowed to refile the same suit against the same defendant and dismissal should therefore be with prejudice.
In the instant case, the trial court specifically indicated that it was not making a decision on the merits. However, it is logically inconsistent to grant a motion for summary disposition under C(8) "not upon the merits." That is the equivalent of saying that "without looking at the merit, the complaint is legally without merit." Thus, summary disposition under C(8) is necessarily a decision on the merits.[2] To grant such a motion "without prejudice" is equally incongruous. That is the equivalent of saying that the plaintiff's claim is without legal merit but he may refile the exact same claim. Logically, then, a grant of summary disposition under subrule C(8) should always be with prejudice.
This conclusion does not, of course, preclude a plaintiff from requesting leave to amend its complaint before the trial court rules on a motion under C(8). In fact, under MCR 2.116(I)(5), the trial court should normally allow such amendments. When the trial court in the instant case granted defendant's motion, plaintiff had two options: (1) seek permission to amend its complaint or (2) appeal the trial court's decision to grant the motion. The granting of a C(8) motion is an immediately appealable decision although often an amendment of defective pleadings is granted. However, even during this interim period, the decision to grant a motion pursuant to C(8) should be characterized as with prejudice. MCR 2.116(I)(5), relating to the opportunity to amend pleadings in response *459 to summary disposition motions, is an exception to the general rule concerning rehearings. MCR 2.119(F)(3). What plaintiff cannot do is simply allow the dismissal to go unchallenged and later refile his complaint in the same court.[3]
The other issue necessarily raised by defendant's appeal is whether the trial court could properly grant both plaintiff's motion for voluntary dismissal and the defendant's motion for summary disposition. Obviously, it could not. The trial court's grant of defendant's motion for summary disposition under MCR 2.116(C)(8) would bar plaintiff from refiling this claim. On the other hand, plaintiff was requesting voluntary dismissal for the express purpose of litigating this claim in another forum. Thus, the trial court could grant one motion or the other, but not both. While it may have been a trial court's past practice to grant a C(8) motion without prejudice, this option is not properly available to it.
Accordingly, the trial court's order is vacated. This matter is remanded for reconsideration of both motions in a manner consistent with this opinion.[4] We do not retain jurisdiction.
MARKMAN, J., concurred.
O'CONNELL, Presiding Judge, dissenting.
I concur with the majority opinion to the extent that the trial court erred in referencing the wrong court rule in this case. However, this error is not fatal to plaintiff's case because this Court may proceed under the appropriate court rule as long as neither party has been misled. Cf. Blair v. Checker Cab Co., 219 Mich.App. 667, 670-671, 558 N.W.2d 439 (1996).[1] I also conclude that the trial court properly dismissed this case pursuant to MCR 2.504(A)(2).
With respect to defendant's motion for summary disposition brought pursuant to MCR 2.116(C)(8), the trial court stated, "[T]he Court would find, based on the arguments and the pleadings relating to this motion, and not upon the merits of this case, the Court is satisfied ... the (C)(8) should be granted" (emphasis supplied). As the majority correctly notes, such a statement is nonsensical. A motion for summary disposition brought pursuant to MCR 2.116(C)(8) is properly granted or denied only on the merits. Because of the trial court's statement, which evinces a marked misunderstanding of the nature of MCR 2.116(C)(8), I would consider the order purporting to grant this motion as void ab initio and of no legal effect.
My review of the record indicates that the court's action in granting defendant's motion was little more than a sop meant to appease defendant. While the majority does not mention this, the hearing regarding defendant's motion for summary disposition below *460 was actually a consolidated hearing in which plaintiff's motion for voluntary dismissal pursuant to MCR 2.504(A)(2) was also addressed. The court granted plaintiff's motion as well as defendant's, both without prejudice. Even a cursory reading of the transcript of this hearing reveals that it was the intent of the court to allow plaintiff to have its case heard in the federal district court, where plaintiff had refiled the action. Only the court's misapprehension of the import of granting defendant's motion for summary disposition caused it to make this conciliatory gesture. The final words of the court at the end of the motion hearing were as follows:
I have ruled, and since you want to know, it is without prejudice, so that you will have an opportunity to address the same motion down with the judge in Federal Court....
The case is dismissed on both grounds. You both win.
I am firmly convinced that the court intended to have the matter heard in the federal court and only granted defendant's motion for summary disposition "not upon the merits" because the court misunderstood the significance of granting the motion.[2]
Thus, considered in context, the actions of the trial court become more understandable, if not entirely defensible. Because I would consider the order granting defendant's motion to be both moot and void ab initio, I would affirm, leaving standing the order granting voluntary dismissal, which result was clearly intended by the court.
NOTES
[*]  Circuit judge, sitting on the Court of Appeals by assignment.
[1]  This Court in Gardner simply stated:

Based on the facts of this case, we find the court did not abuse its discretion in dismissing this matter with prejudice. [ Gardner, supra, at 251, 437 N.W.2d 276.]
[2]  While Michigan courts have not specifically held that the grant of a motion for summary disposition under C(8) is a ruling on the merits, this conclusion is supported by the federal courts' interpretation of the identical federal rule, F.R. Civ. P. 12(b)(6). MCR 2.116(C)(8) was modeled after the federal rule. Glittenberg v. Doughboy Recreational Industries, Inc., 436 Mich. 673, 680, 462 N.W.2d 348 (1990), rev'd on other grounds 441 Mich. 379, 491 N.W.2d 208 (1992). The Sixth Circuit Court of Appeals, for example, has addressed this issue: "In the federal courts, a dismissal pursuant to Rule 12(b)(6) is considered a decision on the merits with full res judicata effect." Dyer v. Intera Corp., 870 F.2d 1063 (C.A.6, 1989) (citing Federated Dep't Stores, Inc. v. Moitie, 452 U.S. 394, 399, n. 3, 101 S.Ct. 2424, 2428, n. 3, 69 L.Ed.2d 103 (1981); Bartsch v. Chamberlin, 266 F.2d 357 (C.A.6, 1959); Cannon v. Loyola Univ. of Chicago, 784 F.2d 777, 780 (C.A.7, 1986), Isaac v. Schwartz, 706 F.2d 15, 17 (C.A.1, 1983); and Teltronics Services, Inc. v. LM Ericsson Telecommunications, Inc., 642 F.2d 31, 34 (C.A.2, 1981)).
[3]  As a general rule, the decision whether to dismiss with or without prejudice is wholly within the trial court's discretion. Such a rule, however, relates to dismissals for such reasons as delay or discovery violations. While grants of summary disposition motions under MCR 2.116(C)(8) are often generically referred to as "dismissals," they are, by their nature, distinct from dismissals under such provisions of the rules as MCR 2.504 or MCR 2.313. A dismissal under such provisions generally affords the trial court broad discretion concerning the res judicata effect of the dismissal. Cf. MCR 2.504(A)(1).
[4]  While the dissent may well be accurate in characterizing the subjective "intent" of the trial court, i.e., to allow plaintiff to have its case heard in the federal district court, the court's actions do not compel this conclusion. Rather than attempting to derive the court's true "intent" from an inherently contradictory set of actions, we prefer to let the court clarify for itself what resolution it would make of this case. Because we have more difficulty than the dissent in reconciling the various actions of the court, we cannot concur with its observation that defendant was "victorious" on its motion or that it is not an aggrieved party. Defendant's motion was predicated on MCR 2.116(C)(8), which requires dismissal with prejudice; rather than being dismissed on this basis, the court granted a motion predicated apparently upon MCR 2.504, which carries altogether different consequences.
[1]  Rather than ruling against the defendant, the court granted the defendant's MCR 2.116(C)(8) motion without prejudice. Under normal circumstances, a litigant would be satisfied to be successful on its motion. Because defendant has not appealed the MCR 2.504(A)(2) dismissal, this appeal is moot. Also, since defendant was victorious on its motion, this appeal raises the issue whether it is an aggrieved party pursuant to the meaning of MCR 7.203(A).
[2]  It is a waste of judicial resources to remand this case to the trial court only to have the trial court reaffirm its prior decision to grant plaintiff's voluntary dismissal pursuant to MCR 2.504(A)(2).
