[¶ 5] To issue a valid order or judgment, a court must have both subject matter and personal jurisdiction. See Trottier v. Bird, 2001 ND 177, ¶ 5, 635 N.W.2d 157; Albrecht v. Metro Area Ambulance, 1998 ND 132, ¶ 10, 580 N.W.2d 583. "Subject-matter jurisdiction is the court's power to hear and determine the general subject involved in the action, while personal jurisdiction is the court's power over a party." Albrecht, at ¶ 10. While a party may waive the right to object and voluntarily submit to the court's personal jurisdiction, Albrecht, at ¶ 10, "`[i]ssues involving subject matter jurisdiction cannot be waived and can be raised sua sponte at any time.'" Trottier, 2001 ND 177, ¶ 5, 635 N.W.2d 157 (quoting Earnest v. Garcia, 1999 ND 196, ¶ 7, 601 N.W.2d 260).
A district court has subject-matter jurisdiction only if, "`the particular issue to be determined [has been] properly brought before the court in the particular proceeding.'"Trottier v. Bird, 2001 ND 177, ¶ 6, 635 N.W.2d 157 (quotingAlbrecht v. Metro Area Ambulance, 1998 ND 132, ¶ 11, 580 N.W.2d 583). If a district court does not have subject-matter jurisdiction, it is compelled to dismiss the action. N.D.R.Civ.P. 12(h)(3).
A dismissal with prejudice is considered an adjudication on the merits. Trottier v. Bird, 2001 ND 177, ¶ 8, 635 N.W.2d 157. Absent jurisdiction
"[W]hen a dismissal is for 'lack of jurisdiction,' the effect is not an adjudication on the merits, and therefore the res judicata bar does not arise." Johnson v. Boyd-Richardson Co., 650 F.2d 147, 148 (8th Cir. 1981); see also Trottier v. Bird, 2001 ND 177, ¶ 6 n.1, 635 N.W.2d 157 (stating dismissal for lack of subject matter jurisdiction is not an adjudication on the merits of a claim); Fettig v. Estate of Fettig, 2019 ND 261, ¶¶ 18, 21, 934 N.W.2d 547 (noting that the doctrines of claim and issue preclusion apply to judgments on the merits). Because the federal district court did not adjudicate the merits of these claims, instead concluding it lacked subject matter jurisdiction, which was affirmed by the Eighth Circuit, these claims are not barred by claim or issue preclusion as a result of the federal action.
Consideration of a name change is not a situation we have previously recognized as one in which a district court may have a duty to act sua sponte , such as a right to appeal or subject matter jurisdiction issue. Trottier v. Bird , 2001 ND 177, ¶ 5, 635 N.W.2d 157 (subject matter jurisdiction may be considered sua sponte ); Hurt v. Freeland , 1997 ND 194, ¶ 4, 569 N.W.2d 266 (right to appeal may be considered sua sponte ). The district court’s sua sponte action was not done to protect an important right. Instead, it unnecessarily created a dispute where none had existed.
See Interest of M.W. , 2010 ND 135, ¶ 5, 785 N.W.2d 211 ; Albrecht v. Metro Area Ambulance , 1998 ND 132, ¶ 10, 580 N.W.2d 583. Issues involving subject matter jurisdiction cannot be waived and can be raised by the parties or the court at any time. See Trottier v. Bird , 2001 ND 177, ¶ 5, 635 N.W.2d 157 ; Earnest v. Garcia , 1999 ND 196, ¶ 7, 601 N.W.2d 260. Subject matter jurisdiction is the court's legal authority to hear and determine the general subject involved in an action. See Garaas v. Cass Cty. Joint Water Res. Dist. , 2016 ND 148, ¶ 4, 883 N.W.2d 436 ; Trottier , at ¶ 6. Dismissal for lack of subject matter jurisdiction is generally appropriate if the plaintiff fails to exhaust administrative remedies, because failure to exhaust those remedies precludes making a claim in court.
Albrecht v. Metro Area Ambulance , 1998 ND 132, ¶ 10, 580 N.W.2d 583. The question of subject matter jurisdiction can be raised at any time during the proceeding. N.D.R.Civ.P. 12(h)(3). Additionally, subject matter jurisdiction cannot be conferred by agreement, consent, or waiver. Trottier v. Bird , 2001 ND 177, ¶ 5, 635 N.W.2d 157 ; UCCJEA § 201, cmt., 9 U.L.A. 673 ("since jurisdiction to make a child custody determination is subject matter jurisdiction, an agreement of the parties to confer jurisdiction on a court that would not otherwise have jurisdiction under this Act is ineffective."). Because subject matter jurisdiction cannot be conferred by agreement, consent, or waiver, Winegar's argument that Klein waived the issue by agreeing to the district court's jurisdiction is without merit.
[¶ 4] Garaas argues the district court acquired subject matter jurisdiction when he timely filed the notice of appeal. “As a prerequisite to issuing a valid order or judgment, a court must have both subject matter and personal jurisdiction.” Trottier v. Bird, 2001 ND 177, ¶ 5, 635 N.W.2d 157. “Subject-matter jurisdiction is the court's power to hear and determine the general subject involved in the action....” Albrecht v. Metro Area Ambulance, 1998 ND 132, ¶ 10, 580 N.W.2d 583. “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. [¶ 5] “For subject-matter jurisdiction to attach, ‘the particular issue to be determined must be properly brought before the court in the particular proceeding.’ ”
Subject-matter jurisdiction cannot be waived and can be raised at any time in a proceeding. Trottier v. Bird, 2001 ND 177, ¶ 5, 635 N.W.2d 157. “The question of subject matter jurisdiction is a question of law and is reviewed de novo, if the jurisdictional facts are not in dispute.” Ellis v. North Dakota State Univ., 2010 ND 114, ¶ 8, 783 N.W.2d 825. “Analysis of a district court's ruling regarding personal jurisdiction is a question of law, which we consider under the de novo standard of review.
[¶ 7] A judgment entered without personal or subject-matter jurisdiction is void. Rolette Cnty., 2005 ND 101, ¶ 6, 697 N.W.2d 333. Subject-matter jurisdiction cannot be waived and can be raised at any time in a proceeding. Trottier v. Bird, 2001 ND 177, ¶ 5, 635 N.W.2d 157. Challenges to jurisdiction are reviewed de novo when jurisdictional facts are not disputed. Rolette Cnty., at ¶ 6. When jurisdictional facts are disputed, however, a district court's decision on subject-matter jurisdiction involves findings of facts and conclusions of law.