
635 N.W.2d 157 (2001)
2001 ND 177
Dulcie N. TROTTIER, Plaintiff and Appellant,
v.
Richard D. BIRD, Defendant and Appellee.
No. 20010150.
Supreme Court of North Dakota.
November 2, 2001.
*158 Robert V. Bolinske, Bismarck, ND, for plaintiff and appellant.
Chris A. Edison, Storslee Law Firm, P.C., Bismarck, ND, for defendant and appellee.
KAPSNER, Justice.
[¶ 1] Dulcie Trottier appeals from the trial court's dismissal with prejudice of her claim against Richard Bird. Because the trial court decided it did not have subject matter jurisdiction over Trottier's claim, it *159 should have dismissed the claim in accordance with N.D.R.Civ.P. 12(h)(3). We reverse and remand with directions to vacate the judgment and to dismiss the case for lack of subject matter jurisdiction.

I
[¶ 2] On March 26, 1996, Bird allegedly struck the rear of a vehicle driven by Trottier on the Standing Rock Sioux Indian Reservation. Bird is an enrolled member of the Standing Rock Sioux Tribe. Trottier is not a member of the Standing Rock Sioux Tribe; she is a member of the Turtle Mountain Chippewa Tribe. Trottier brought a negligence cause of action against Bird in Sioux County District Court. Bird's answer alleged lack of both personal and subject matter jurisdiction.
[¶ 3] Following completion of initial discovery, Bird brought a motion for summary judgment pursuant to Rule 56 of the North Dakota Rules of Civil Procedure. This motion was based on the trial court not possessing subject matter jurisdiction over the claim. In conjunction with the summary judgment motion, Bird also brought a motion to dismiss the claim with prejudice. Trottier responded by requesting the trial court to dismiss her claim without prejudice. She did not assert the court had subject matter jurisdiction. The trial court determined it lacked subject matter jurisdiction because the Standing Rock Sioux Tribe had not granted the state jurisdiction pursuant to Chapter 27-19 of the North Dakota Century Code. The trial court granted summary judgment and ordered the action dismissed with prejudice.
[¶ 4] After the trial court dismissed the case with prejudice, Trottier brought a Rule 59(j) motion to amend the dismissal to be without prejudice. N.D.R.Civ.P. 59(j). The trial court denied this motion. Trottier appeals "from the judgment entered in this matter and from all adverse decisions in connection therewith."

II
[¶ 5] As a prerequisite to issuing a valid order or judgment, a court must have both subject matter and personal jurisdiction. Albrecht v. Metro Area Ambulance, 1998 ND 132, ¶ 10, 580 N.W.2d 583. The question of whether a court has subject matter jurisdiction can be raised at any time in the proceeding. N.D.R.Civ.P. 12(h)(3). "Issues involving subject matter jurisdiction cannot be waived and can be raised sua sponte at any time." Earnest v. Garcia, 1999 ND 196, ¶ 7, 601 N.W.2d 260.
[¶ 6] "Subject-matter jurisdiction is the court's power to hear and determine the general subject involved in the action...." Albrecht, 1998 ND 132, ¶ 10, 580 N.W.2d 583. "Subject-matter jurisdiction is derived from the constitution and the laws, and cannot be conferred by agreement, consent or waiver." Long v. Long, 439 N.W.2d 523, 525 (N.D.1989) (citation omitted). "For subject-matter jurisdiction to attach, `the particular issue to be determined must be properly brought before the court in the particular proceeding.'" Albrecht, at ¶ 11 (quoting Reliable, Inc. v. Stutsman County Comm'n, 409 N.W.2d 632, 634 (N.D.1987)). If subject matter jurisdiction is lacking, North Dakota Rule of Civil Procedure 12(h)(3) compels the dismissal of the action: "Whenever it appears by suggestion of the parties or otherwise that the court lacks jurisdiction of the subject matter, the court shall dismiss the action."[1]
*160 [¶ 7] In this case, the trial court decided it did not possess subject matter jurisdiction over Trottier's cause of action. This determination was neither challenged at the trial court nor appealed. Trottier has waived this issue, and we do not address it. See Klose v. Klose, 524 N.W.2d 94, 96 (N.D.1994). Therefore, we assume, without reviewing the issue, the trial court lacked subject matter jurisdiction.
[¶ 8] After rendering its judgment, the trial court entertained a Rule 59(j) motion brought by Trottier to amend the dismissal with prejudice to one without prejudice. N.D.R.Civ.P. 59(j). This motion was denied. "The decision on a motion to amend a judgment under Rule 59(j) rests in the trial court's sound discretion and will not be reversed on appeal unless there is a manifest abuse of discretion." Woodworth v. Chillemi, 1999 ND 43, ¶ 7, 590 N.W.2d 446. In turn, "[a] trial court abuses its discretion when it misinterprets or misapplies the law, or when its decision is not the product of a rational mental process leading to a reasoned determination." Id. (citation omitted). In this case, the trial court judge's decision to grant summary judgment and dismiss with prejudice was a misapplication of the law. Instead of dismissing Trottier's cause of action once it determined it did not have subject matter jurisdiction, as it should have under Rule 12(h)(3) of the North Dakota Rules of Civil Procedure, the trial court entered summary judgment dismissing the action with prejudice. A summary judgment is a final judgment and has the effect of adjudicating the merits of the particular claim. Garofalo v. Saint Joseph's Hospital, 2000 ND 149, ¶ 6, 615 N.W.2d 160. The effect of dismissing a case with prejudice is to bar any future claim, as that action amounts to a final disposition of the controversy.[2]Williams v. State, 405 N.W.2d 615, 622 (N.D.1987); see also 46 Am.Jur.2d Judgments § 609 (1994) ("The term `with prejudice,' expressed in a judgment of dismissal, has a well-recognized legal import; and it indicates an adjudication of the merits, operating as res judicata, concluding the rights of the parties, terminating the right of action, and precluding subsequent litigation of the same cause of action...."). Any action beyond dismissing the claim for want of subject matter jurisdiction is a misapplication of the North Dakota Rules of Civil Procedure. The trial court's refusal to amend its judgment of dismissal with prejudice was an abuse of discretion. Without subject matter jurisdiction, a court, whether trial or appellate, is powerless to act. Bryan v. Miller, 73 N.D. 487, 16 N.W.2d 275, 284 (1944). The case should have been dismissed pursuant to Rule 12(h)(3) of the North Dakota Rules of Civil Procedure for lack of subject matter jurisdiction.

III
[¶ 9] We reverse and remand with directions to vacate the judgment and to dismiss the case for lack of subject matter jurisdiction.
[¶ 10] VANDE WALLE, C.J., KAPSNER, SANDSTROM, NEUMANN and MARING, JJ.
NOTES
[1]  The North Dakota Rules of Civil Procedure are clear that a dismissal for lack of subject matter jurisdiction under Rule 12(h)(3) is not an adjudication on the merits of the cause of action but only a determination of a court's jurisdiction to hear and decide the dispute. See N.D.R.Civ.P. 41(b).
[2]  Trottier informed the trial court she intended to litigate her negligence cause of action in federal district court.
