
933 P.2d 987 (1997)
Fred A. ALVAREZ, Plaintiff and Appellant,
v.
Hank GALETKA, Warden, Utah State Prison, and Fred Van Der Veur, Warden, Gunnison Facility, Defendants and Appellees.
No. 950547.
Supreme Court of Utah.
March 7, 1997.
Ronald J. Yengich, Hakeem Ishola, Salt Lake City, for plaintiff and appellant.
Jan Graham, Atty. Gen., Kenneth A. Bronston, Asst. Atty. Gen., for defendants and appellees.
*988 RUSSON, Justice:

I. INTRODUCTION
Fred A. Alvarez appeals the district court's dismissal of his habeas corpus petition for failure to state a claim for which relief can be granted under rule 12(b)(6) of the Utah Rules of Civil Procedure. We affirm in part, reverse in part, and remand for further proceedings.

II. BACKGROUND
Alvarez was convicted of first degree murder, pursuant to Utah Code Ann. § 76-5-202(1)(b) (1990), as a result of his involvement in a fight that resulted in the stabbing deaths of Don and Shayne Newingham in June 1990.[1] Alvarez was sentenced to life imprisonment, augmented by a twenty-year enhancement pursuant to the gang enhancement provision of Utah Code Ann. § 76-3-203.1 (Supp.1992).
Following the trial, Alvarez retained a different attorney to appeal his conviction to this court. In that appeal, Alvarez challenged, among other things, the trial judge's response to a jury inquiry during deliberations[2] and the constitutionality of the gang enhancement provision. In State v. Alvarez, 872 P.2d 450 (Utah 1994), in the process of affirming his conviction, this court concluded that Alvarez's trial attorney had failed to preserve for review the challenges to the jury instruction and the gang enhancement provision. 872 P.2d at 460.
Alvarez subsequently retained a third attorney and filed a habeas corpus petition, claiming ineffective assistance of counsel at both the trial and the appellate levels. Alvarez claimed that his trial attorney was ineffective because he (1) failed to investigate certain witnesses who allegedly could provide testimony favorable to Alvarez, (2) failed to preserve for review the challenge to the jury instruction, (3) failed to preserve for review the challenge to the gang enhancement provision, and (4) failed to preserve, for purposes of a Batson v. Kentucky claim, the identity of allegedly Hispanic jurors peremptorily struck from the jury panel.[3] Alvarez further claimed that his appellate counsel was ineffective because he did not argue trial counsel's ineffectiveness in failing to preserve for appeal the jury instruction and gang enhancement challenges. Alvarez requested an evidentiary hearing on his claim that trial counsel inadequately investigated the homicide.
The State responded by moving to dismiss Alvarez's petition for, among other reasons, failure to state a claim for which relief can be granted pursuant to rule 12(b)(6) of the Utah Rules of Civil Procedure.[4] In October 1995, the habeas court granted the State's motion and dismissed Alvarez's habeas petition. Alvarez now appeals that dismissal.
In this appeal, Alvarez argues that rule 12(b)(6) is inapplicable to habeas corpus actions and that such actions are governed only by rule 65B of the Utah Rules of Civil Procedure. Alvarez further argues that his petition was sufficient in light of rule 65B.
*989 The State responds that rule 12(b)(6) does apply to habeas corpus petitions and that the habeas court was correct in dismissing Alvarez's petition.

III. STANDARD OF REVIEW
When reviewing a trial court's grant of a rule 12(b)(6) motion to dismiss, "we accept the factual allegations in the complaint as true and consider them and all reasonable inferences to be drawn from them in a light most favorable to the plaintiff." St. Benedict's Dev. Co. v. St. Benedict's Hosp., 811 P.2d 194, 196 (Utah 1991). "Because the propriety of a 12(b)(6) dismissal is a question of law, we give the trial court's ruling no deference and review it under a correctness standard." Id.

IV. ANALYSIS
It is clear that rule 12(b)(6) of the Utah Rules of Civil Procedure does apply to habeas corpus petitions. It is true that rule 65B of the Utah Rules of Civil Procedure is the rule that generally governs the drafting, filing, and disposition of habeas corpus petitions. However, that rule makes provision for the application of other rules when necessary. Rule 65B(a) reads, in relevant part, "To the extent that this rule does not provide special procedures, proceedings on petitions for extraordinary relief shall be governed by the procedures set forth elsewhere in these rules." Further, rule 65B(b), upon which Alvarez bases his petition, specifically refers to the application of motions to dismiss. Rule 65B(b)(9) states in relevant part:
Within twenty days ... after service of a copy of the petition upon the attorney general and county attorney ... the attorney general or county attorney shall answer or otherwise respond to the portions of the petition that have not been dismissed [as frivolous on their face pursuant to 65B(b)(7)] and shall serve the answer or other response upon the petitioner in accordance with Rule 5(b). Within twenty days ... after service of any motion to dismiss or for summary judgment, the petitioner may respond by memorandum to the motion.
(Emphasis added.) In addition, Utah courts have applied rule 12(b)(6) to habeas petitions. See, e.g., Candelario v. Cook, 789 P.2d 710, 711 (Utah 1990) (holding judge's dismissal of habeas petition for "failure to state a claim upon which relief may be granted" was "correct"); Gonzales v. Morris, 610 P.2d 1285, 1286-87 (Utah 1980) (explicitly rejecting argument that motion to dismiss is not allowed under rule 65B); see also Estes v. Van Der Veur, 824 P.2d 1200 (Utah.Ct.App.1992) (per curiam) (affirming 12(b)(6) dismissal of habeas petition while still recognizing that habeas proceedings are generally governed by rule 65B).
Rule 12(b)(6) concerns the sufficiency of the pleadings, not the underlying merits of a particular case.[5] 5A Charles Alan Wright & Arthur R. Miller, Federal Practice and Procedure § 1356 (2d ed. 1990). When a 12(b)(6) motion is filed, the issue before the court is whether the petitioner has alleged enough in the complaint to state a cause of action, and this preliminary question is asked and answered before the court conducts any hearings on the case. In the case before us, the preliminary question is whether Alvarez's petition sufficiently alleged all of the elements of an ineffective assistance of counsel claim. If it did not, then the habeas court correctly dismissed the petition before ordering an evidentiary hearing.
The two-part test for determining whether someone has been rendered ineffective assistance of counsel, as stated in Strickland v. Washington, 466 U.S. 668, 687, 104 S.Ct. 2052, 2064, 80 L.Ed.2d 674 (1984), and as adopted in Utah, see State v. Templin, 805 P.2d 182, 186 (Utah 1990), is as follows:
First, the defendant must show that counsel's performance was deficient. This requires showing that counsel made errors so serious that counsel was not functioning *990 as the "counsel" guaranteed the defendant by the Sixth Amendment. Second, the defendant must show that the deficient performance prejudiced the defense. This requires showing that counsel's errors were so serious as to deprive the defendant of a fair trial, a trial whose result is reliable.
The Strickland Court further stated that to show prejudice, "[t]he defendant must show that there is a reasonable probability that, but for counsel's unprofessional errors, the result of the proceeding would have been different. A reasonable probability is a probability sufficient to undermine confidence in the outcome." 466 U.S. at 694, 104 S.Ct. at 2068.
In his habeas petition, Alvarez did allege the first prong of the Strickland test, namely, that the performances of his prior attorneys were deficient. Alvarez even alleged facts that he believed supported this assertion. However, he completely failed to allege either how he was prejudiced by the claimed ineffectiveness or that he was prejudiced at all. The word "prejudice" does not even appear in his petition. In other words, Alvarez's petition failed to allege one of the two basic required elements of an ineffective assistance of counsel claim. Thus, the petition cannot pass muster under the scrutiny of rule 12(b)(6). See 2A James Wm. Moore et al., Moore's Federal Practice ¶ 12.07 (2d ed. 1996) ("Dismissal is proper if the complaint lacks an allegation regarding a required element necessary to obtain relief....").
In Hill v. Lockhart, 474 U.S. 52, 106 S.Ct. 366, 88 L.Ed.2d 203 (1985), the United States Supreme Court considered a habeas corpus petition in which the petitioner claimed that he had received ineffective assistance of counsel when he pleaded guilty to charges of first degree murder and theft of property in an Arkansas court. The Supreme Court, however, held it unnecessary to reach the merits of the case because it concluded that the "petitioner's allegations [were] insufficient to satisfy the Strickland v. Washington requirement of `prejudice.'" The petitioner did not allege in his habeas corpus petition that had his attorney properly advised him, the outcome would have been different  i.e., "he would have pleaded not guilty and insisted on going to trial." Therefore, the Supreme Court concluded that the district court did not err in dismissing the habeas petition without holding an evidentiary hearing on the ineffective assistance of counsel claim. Id. at 60, 106 S.Ct. at 371.
In this case, as in Hill, Alvarez also failed to allege prejudice, a basic required element of an ineffective assistance of counsel claim. Thus, under Strickland and Hill, his petition was insufficient, and the habeas court correctly dismissed his petition for failure to state a claim under rule 12(b)(6).[6]
Although the habeas court did not specify whether its order of dismissal was with or without prejudice, it is a general rule that if a court grants an involuntary dismissal and does not specify whether it is with or without prejudice, it is assumed that the dismissal is with prejudice. Rule 41(b) of the Utah Rules of Civil Procedure clearly states, "Unless the court in its order for dismissal otherwise specifies, a dismissal under this subdivision and any dismissal not provided for in this rule ... operates as an adjudication upon the merits." Utah R.Civ.P. 41(b) (emphasis added); see also Madsen v. Borthick, 769 P.2d 245, 248 (Utah 1988) ("[R]ule 41(b) ... comprehensively define[s] a dismissal *991 on the merits; not just rule 41(b) dismissals, but all dismissals.").
However, it is also a general rule that a "dismissal under Rule 12(b)(6) generally is not final or on the merits and the court normally will give plaintiff leave to file an amended complaint." Wright & Miller, supra, § 1357. "Amendment should be refused only if it appears to a certainty that plaintiff cannot state a claim." Id. We cannot say in this case that Alvarez cannot state a claim upon which relief can be granted. Thus, while the habeas court correctly applied rule 12(b)(6) to Alvarez's petition, the court should have dismissed the petition without prejudice and granted Alvarez leave to amend the complaint to comport with the requirements of rule 12(b)(6).

V. CONCLUSION
On the basis of the foregoing, we affirm the habeas court's dismissal of Alvarez's habeas corpus petition under rule 12(b)(6) of the Utah Rules of Civil Procedure, order that the dismissal be without prejudice, and remand to the habeas court for further proceedings consistent with our opinion.
ZIMMERMAN, C.J., and HOWE and DURHAM, JJ., concur.
STEWART, Associate Chief Justice, dissenting:
I agree that this case should be remanded, but write separately to comment on the majority's incorrect treatment of Rule 12(b)(6). Whether, as a matter of law, Alvarez's petition was insufficient "under any state of facts which could be proved in support of its claim," Arrow Indus. v. Zions First Nat'l Bank, 767 P.2d 935, 936 (Utah 1988), remains to be seen, but it certainly was not insufficient because it failed to allege prejudice. Even a cursory reading of the petition demonstrates as much. Alvarez's petition alleged the following three claims:[1]
1. Trial counsel was ineffective in failing to make an objection and preserving the record when the trial court committed an obvious and plain error during jury deliberations with relation to a jury instruction on the elements of first degree felony murder. That instruction provided:
That Fred A. Alvarez caused said death under circumstances where the homicide was committed incident to one act, scheme, course of conduct, or criminal episode during which two or more persons are killed.
While deliberating, the jury asked the court the following question: "Do you need to satisfy all elements listed or just one?" To which the Court responded, "Any single element set forth ... is sufficient." Because this is clearly wrong, since the instruction requires the satisfaction of two different elements beyond a reasonable doubt, trial counsel was ineffective by failing to raise this issue in his appellate brief.[2]
2. At trial, counsel objected to the section under which Petitioner was sentenced, UTAH CODE ANN. § 76-3-203.1 (1953, as amended). The Supreme Court of Utah... held that trial counsel, although challenging the constitutionality of the statute, had failed to properly preserve the issue because his objection was general rather than specific. Again, this clearly constituted ineffectiveness on counsel's part, which was not raised on appeal by appellate counsel.
3. Petitioner claims that trial counsel failed to properly investigate this matter. Petitioner submits that no investigator was ever retained in this matter and that trial counsel ignored Petitioner's requests to investigate the possible evidence relating to *992 Tony DeHerrera, who Petitioner claims committed the homicide. Mr. DeHerrera was never interviewed and was not contacted concerning this case. In addition, there is at least one witness that Petitioner is aware of who had evidence concerning Mr. DeHerrera's involvement in the homicide. Trial counsel ignored that information. Petitioner requests this Court order an evidentiary hearing be held on this matter in order to make a record as to the lack of investigation pursuant to State v. Templin, 805 P.2d 182 (Utah 1990).
I submit that these three claims are sufficient on their face, at least with respect to their allegations of prejudice. The first allegation clearly asserts that the judge gave incorrect information to the jury on the required elements of the crime. The prejudice alleged is self-evident. Specifically, he alleges the possibility that the jury convicted without finding that all the necessary elements were satisfied. In fact, it is difficult to understand what more Alvarez could state which would make this more clear unless talismanic significance is accorded to the word "prejudice."
The second allegation states that counsel failed to preserve with adequate specificity Alvarez's objection to the gang sentencing enhancement statute. Again, the prejudice alleged is self-evident. If counsel had preserved the objection, this Court could have treated the issue on the merits, and if the statute were found unconstitutional, Alvarez's sentence under that statute would necessarily be vacated.
The third allegation states that trial counsel failed to properly investigate the matter, and specifically refers to another person, Tony DeHerrera, who petitioner claims actually committed the homicide. Although the petition might have been more specific about the general nature of the asserted exculpatory evidence relating to DeHerrera, I cannot agree that this renders the allegation insufficient for failure to allege prejudice.
The habeas court held that Alvarez's claim of failure to investigate exculpatory evidence did not demonstrate prejudice because under the undisputed facts, he was at least an accomplice to the murders, even if he did not personally wield the knife which killed either Don or Shayne Newingham.[3] Alvarez was convicted of first degree murder under a definition of that crime which required the jury to find that he had caused the death of Don Newingham "incident to one ... criminal episode during which two or more persons were killed." Evidence showing that another person killed Don Newingham would be directly relevant to proof of an essential element of the crime.
Absent that element, Alvarez likely would not have been convicted of the same degree of crime under the aiding and abetting instruction. Alvarez was involved in a melee in which both Don and Shayne Newingham were killed. The jury convicted Alvarez of first degree murder in the killing of Don Newingham but acquitted him with respect to Shayne Newingham. The jury almost certainly based its verdict on a conclusion that Alvarez stabbed Don but that there was insufficient evidence to show that he stabbed Shayne. In light of the jury's demonstrated concern that Alvarez be personally responsible for killing, it is untenable to assert that had the jury been convinced Alvarez did not stab Don or Shayne, it would have nevertheless convicted him of the same degree of crime under the aiding and abetting instruction given by the trial court.
NOTES
[1]  For a detailed account of the facts underlying Alvarez's conviction, see State v. Alvarez, 872 P.2d 450, 452-53 (Utah 1994).
[2]  The trial court gave the jury the following instruction relevant to the homicide of Don Newingham: "3. That Fred A. Alvarez caused said death under circumstances where the homicide was committed incident to one act, scheme, course of conduct, or criminal episode during which two or more persons are killed." While they were deliberating, the jury submitted the following question to the judge regarding the instruction: "Do you need to satisfy all elements listed or just one?" The judge responded, "Any single element set forth in paragraph 3 ... is sufficient." Alvarez's trial attorney did not object to either the instruction or the judge's response to the jury's question.
[3]  See Batson v. Kentucky, 476 U.S. 79, 106 S.Ct. 1712, 90 L.Ed.2d 69 (1986) (dismissing jurors solely on the basis of race gives rise to equal protection claim). This claim was later withdrawn and is now irrelevant for our purposes.
[4]  In its motion, the State also contended that Alvarez's petition should be dismissed (1) for improperly raising claims that the State argued should have been raised on direct appeal, and (2) for failing to attach to his petition evidence in support of his "failure to investigate" claim. However, because rule 12(b)(6) is dispositive, it is not necessary for us to address these other contentions here.
[5]  The relevant language of rule 12(b)(6) is as follows:

Every defense, in law or fact, to claim for relief in any pleading ... shall be asserted in the responsive pleading thereto if one is required, except that the following defenses may at the option of the pleader be made by motion:... (6) failure to state a claim upon which relief can be granted....
[6]  The State argued to this court that the 12(b)(6) motion was converted into a rule 56 motion for summary judgment because the habeas court, in its dismissal, considered the effect of an aiding and abetting instruction that was given to the jury at the original trial. However, a jury instruction given at trial is not a matter "outside the pleadings" sufficient to convert the motion to one for summary judgment. Moore, supra, ¶ 12.07 (items attached to pleading, items of public record, and items in trial record will not convert 12(b)(6) motion to rule 56 motion for summary judgment); Wright & Miller, supra, § 1357. Further, the habeas court did not treat the motion as one for summary judgment, and even if it had, Alvarez was not given notice or reasonable opportunity to respond as required by rule 12(c). See Colman v. Utah State Land Bd., 795 P.2d 622, 624-25 (Utah 1990) (declining to convert rule 12(b)(6) motion to one for summary judgment where opposing party had not been given opportunity to present additional evidence).
[1]  Alvarez also alleged a fourth claim relating to trial counsel's failure to preserve the identities of peremptorily struck Hispanic jurors but withdrew that claim during habeas proceedings before the district court.
[2]  The reference to counsel's failure on appeal could bear some clarification. In the first place, Alvarez had a different attorney on appeal. Second, Alvarez did in fact raise the issue of the impropriety of the court's response to the jury's question on direct appeal, and we ruled that he had waived it at trial. See Alvarez, 872 P.2d 450, 460 (Utah 1994). Therefore, the reference to ineffectiveness on direct appeal presumably refers to Alvarez's appellate counsel's purported failure to raise a plain error argument.
[3]  The State, in defending this argument, refers to dicta in Codianna v. Morris, 660 P.2d 1101 (Utah 1983), which stated that a proper aiding and abetting instruction demonstrated that the defendant could have been convicted of murder even if he did not commit the actual killings. I do not agree that such speculation, by itself, can justify the rejection of a claim of ineffective assistance of counsel. How can it be said that no prejudice has been alleged if a different verdict could have, and likely would have, resulted if a jury had heard and accepted exculpatory evidence?
