
    Albert “Rusty” KOUBA, Plaintiff and Appellant, v. FEBCO, INC., a North Dakota corporation, d/b/a Super Eight Lodge of Williston, North Dakota, and Robert D. Balkowitsch, individual, and Several Unknown Defendants, Defendants and Appellees.
    Civil No. 950295.
    Supreme Court of North Dakota.
    Feb. 13, 1996.
    
      Albert “Rusty” Kouba, Williston, pro se.
    David A. Tschider of Tsehider & Smith, Bismarck, for defendants and appellees.
   NEUMANN, Justice.

Albert “Rusty” Kouba appeals from a judgment dismissing his action without prejudice. We dismiss the appeal.

Kouba was employed as a desk clerk at a motel owned and operated by Febeo. In April 1995, Febeo discharged Kouba for mishandling an altercation that occurred days earlier between Kouba and several motel guests. In May 1995, Kouba sued Febeo, Robert Balkowitsch, the owner of Febeo, and the motel guests. Kouba’s complaint alleged an employee of Febeo defamed his character, Febeo and Balkowitsch wrongfully discharged him, and all the defendants conspired among themselves to wrongfully discharge him. Febco’s answer included a counterclaim against Kouba for allegedly attempting to extort money.

In June 1995, Febeo moved for summary judgment, arguing an absence of disputed facts and failure to state a claim upon which relief could be granted. The trial court granted Febco’s motion under Rule 56(b), N.D.R.Civ.P., concluding Kouba failed to state a claim upon which relief could be granted under Rule 12(b)(5), N.D.R.Civ.P. The court ordered both Kouba’s claim and Febco’s counterclaim dismissed without prejudice. After receiving a request from Febeo to explain the dismissal without prejudice, the court stated, in relevant part:

“As to why the Plaintiffs case was dismissed without prejudice, I dismissed primarily for the failure to state a cause of action. This is not to say that the Plaintiff has no causes of action whatsoever against the Defendant but only that the Plaintiff had not stated one in his pleadings. To dismiss with prejudice under these circumstances to me would be inconsistent. Since the Plaintiff has stated no claim, to what would the prejudice attach.”

Kouba argues on appeal the trial court erred when it granted Febco’s motion for summary judgment.

The manner in which the trial court dismissed Kouba’s complaint, dismissal without prejudice, is inconsistent with the ground the court stated for dismissing the complaint, failure to state a claim upon which relief can be granted (12)(b)(5)). A dismissal without prejudice neither precludes a subsequent action nor addresses the merits of an action. E.g., Community Homes of Bismarck v. Clooten, 508 N.W.2d 364, 365 (N.D.1993); Runck v. Brakke, 421 N.W.2d 487, 488 (N.D.1988). Conversely, a 12(b)(5) dismissal bars a subsequent action and generally involves the merits of an action. See Smith v. City of Grand Forks, 478 N.W.2d 370, 372 (N.D.1991) (quoting Arrowsmith v. United Press Int’l, 320 F.2d 219, 221 (2nd Cir.1963)); 2A J. Moore, Moore’s Federal Practice ¶ 12.07[2-5] (2d ed.1995); but see McLean v. Kirby Co., 490 N.W.2d 229, 233 (N.D.1992). “[A] dismissal for failure to state a claim upon which relief can be granted is with prejudice.” Arrowsmith, 320 F.2d at 221.

We reconcile the trial court’s inconsistent manner of dismissal and ground for dismissal by concluding the court should not have dismissed Kouba’s complaint for failure to state a claim upon which relief could be granted. The purpose of a 12(b)(5) motion is to test the legal sufficiency of the particular statement of the claim presented in the complaint. McLean, 490 N.W.2d at 233. Because “a primary objective of the legal system is to obtain a determination on the merits, rather than a dismissal based on the pleadings, [12(b)(5) ] motions ... are generally viewed with disfavor.” Cabo Distr. Co., Inc. v. Brady, 821 F.Supp. 601, 608 (N.D.Cal.1992); McLean, 490 N.W.2d at 238.

The trial court’s letter explaining its manner of dismissal suggests the trial court was not convinced “beyond doubt that [Kouba could] prove no set of facts in support of [a] claim which would entitle [him] to relief.” Livingood, 477 N.W.2d at 188 (stating the standard for dismissing a complaint under 12(b)(5)); 5A C. Wright & A. Miller, Federal Practice & Procedure, Civil 2d § 1357, at 325 (1990). The trial court seemed to suggest Kouba’s allegations were enough to raise the possibility that a claim could be stated if some additional facts were pleaded, and that some relief could be granted Kouba. E.g., Powell Duffryn Terminals v. CJR Processing, Inc., 808 F.Supp. 652, 653-57 (N.D.Ill.1992) (finding allegations demonstrated an inference possibly supporting a claim); Vorvis v. S. New England Telephone Co., 821 F.Supp. 851, 853 (D.Conn.1993) (stating “a court is under a duty to determine whether the plaintiff has a valid claim under any possible theory” when considering a 12(b)(5) motion); 5A C. Wright & A. Miller, § 1357, at 339. Thus, the trial court should not have dismissed Kouba’s action upon failing to state a claim for which relief could be granted.

Instead of dismissing an action under 12(b)(5) when a plaintiff may have a claim, a trial court’s more appropriate course of action might be to grant the plaintiff leave to amend the complaint. E.g., Powell Duffryn, 808 F.Supp. at 653-57 (granting plaintiff leave to amend the complaint when allegations demonstrated an inference possibly supporting a claim). “Final judgment is appropriately rendered under Rule 12(b) ([5]) when it is plain that the plaintiff has no claim to state; when a plaintiff has imperfectly stated what may be an arguable claim, however, leave to amend is ordinarily in order.” E.g., Alley v. Resolution Trust Corp., 984 F.2d 1201, 1207 (D.C.Cir.1993). Nonetheless, the trial court accomplished in substance, if not form, essentially the same result as the more appropriate course of action when it dismissed Kouba’s action without prejudice. Powell Dujfryn, 808 F.Supp. at 655 (indicating why a dismissal without prejudice was justified when plaintiff’s allegations demonstrated an inference possibly supporting a claim). Kouba is not barred from bringing a subsequent action in this matter. However, a dismissal without prejudice is not appealable to this court. See Community Homes, 508 N.W.2d at 365. Therefore, we must dismiss the appeal.

VANDE WALLE, C.J., and SANDSTROM and MESCHKE, JJ., concur.

LEVINE, J., concurs in the result. 
      
      . Although a motion for summary judgment and a motion to dismiss for failure to state a claim for which relief can be granted are different motions, the motions can be treated as "functional equivalent[s]” depending on whether the motion is based solely on the pleadings or on the proofs and the pleadings. N. Ark. Med. Ctr. v. Barrett, 962 F.2d 780, 784 (8th Cir.1992) (stating "a summary judgment motion filed solely on the basis of pleadings is the functional equivalent of a dismissal [for failure to state a claim]”); Livin-good v. Meece, 477 N.W.2d 183, 187 (N.D.1991) (stating "[i]f, on a motion to dismiss for failure to state a claim ..., matters outside the pleadings are presented to and not excluded by the court, the motion should be treated as one for summary judgment”).
     
      
      . The trial court determined Kouba’s action against the motel guests had not been commenced because the guests were not served process. Thus, no dismissal of the action was required.
     