
836 P.2d 1227 (1992)
Judy Lorene WHIRRY, Plaintiff and Appellant,
v.
Harry Franklin SWANSON, Defendant and Respondent.
No. 91-608.
Supreme Court of Montana.
Submitted on Briefs April 30, 1992.
Decided August 24, 1992.
George B. Best, Kalispell, for plaintiff and appellant.
Richard DeJana, Kalispell, for defendant and respondent.
*1228 GRAY, Justice.
This is an appeal from an Order of the Eleventh Judicial District Court, Flathead County, granting defendant/respondent's Motion for Judgment on the Pleadings and dismissing the action with prejudice. We affirm.
The issues on appeal are:
1. Did the District Court err in concluding that res judicata barred the action before it?
2. Did the District Court's application of res judicata violate Whirry's right to due process?
ABC Collectors brought an action in justice court against appellant Judy Whirry (Whirry) for payment of a medical debt owed by Whirry. Whirry filed an answer in which she admitted receiving the medical services and not paying for them. Whirry also filed a third-party complaint against Harry Swanson (Swanson) alleging that she incurred the medical debt as a result of injuries received in an automobile accident in which Swanson was negligent; on that basis, she asserted that Swanson was solely liable for any judgment against her. Whirry subsequently moved for summary judgment against Swanson on her third-party complaint. The court granted summary judgment to Whirry.
Whirry then filed a complaint in District Court seeking recovery for all damages she incurred through the negligent and reckless misconduct of Swanson during the same accident. Swanson filed a Motion for Judgment on the Pleadings and for Dismissal claiming Whirry's District Court action was barred by her summary judgment in justice court. The District Court granted Swanson's motions and dismissed the matter with prejudice on October 30, 1991. Whirry appealed.

I.
Did the District Court err in concluding that res judicata barred the action before it?
The District Court determined that the four criteria necessary for the application of res judicata were met and that the justice court necessarily determined Swanson's negligence in order to assign liability for Whirry's medical bills. Whirry argues that none of the res judicata criteria were met and that the justice court was not a court of competent jurisdiction as also required for application of res judicata. Her arguments are without merit.
The principle underlying the doctrine of res judicata is that a party is prohibited from relitigating a matter that the party has already had an opportunity to litigate. Higham v. City of Red Lodge (1991), 247 Mont. 400, 807 P.2d 195. Four substantive criteria for res judicata must be met: the parties or their privies must be the same; the subject matter of the action must be the same; the issues must be the same and relate to the same subject matter; and the capacities of the persons must be the same in reference to the subject matter and to the issues. Filler v. Richland County (1991), 247 Mont. 285, 806 P.2d 537. Finally, although often left unstated, the court making the judgment must be a court of competent jurisdiction. Hughes v. Salo (1983), 203 Mont. 52, 659 P.2d 270, citing Southern Pacific R. Co. v. United States (1897), 168 U.S. 1, 48-49, 18 S.Ct. 18, 27, 42 L.Ed. 355, 377.
The four criteria required for res judicata are met here. First, the parties are the same in both actions insofar as Whirry filed against Swanson on both occasions. The fact that the justice court action also involved another party is not relevant since there is no requirement for perfect identity of all parties. Second, the subject matter of both of Whirry's complaints against Swanson is the same, namely, the accident caused by Swanson's alleged negligence and Swanson's liability for Whirry's resulting damages. The fourth required criterion is also satisfied: Whirry was the tort plaintiff and Swanson the tort defendant in both actions involving the parties and both acted in their individual capacities.
*1229 The third res judicata criterion  whether the issues are the same  is the key element here. In order to determine that the criterion is met, the fundamental or essential question involved in the second case must have been raised and determined in the first case. Baertsch v. County of Lewis and Clark (1986), 223 Mont. 206, 727 P.2d 504.
In her justice court complaint against Swanson, Whirry claimed that: (1) she and Swanson were involved in an automobile accident in 1989; (2) the accident was caused by Swanson's negligence; (3) the negligence caused her damage and injury; and (4) as a result, Swanson was solely responsible for the medical services debt she incurred as an outgrowth of the accident. The justice court granted Whirry's motion for summary judgment on her claim against Swanson.
Whirry's District Court complaint asserts that the same accident occurred, that Swanson's negligence and recklessness caused the accident, that she was injured, and that she incurred medical expenses and other damage as a result. She prays for compensation for all injuries, detriment and damage.
It is clear that the essential and fundamental issue in both Whirry complaints against Swanson is Swanson's negligence in causing the accident and Whirry's injuries. Determination of this issue is dispositive in both actions. The issue of Swanson's negligence having been raised and determined in Whirry's justice court action, we conclude that the identity of issues required for application of res judicata is met.
Whirry also argues that justice court was not a court of competent jurisdiction for res judicata purposes because it could not grant her relief for the total damages she suffered as a result of Swanson's negligence. She cites no authority for this position. Therefore, we note only the general rule that:
[W]here a plaintiff who has a claim which in its entirety exceeds in amount the court's jurisdiction brings an action and recovers judgment for an amount within the court's jurisdiction, he is, by operation of the judgment precluded from thereafter maintaining an action for the balance of his claim, even though the court rendering the former judgment had no authority to give a judgment upon this balance.
46 Am.Jur.2d, Judgments, § 450 (1969).
Whirry's "court of competent jurisdiction" argument is, in reality, a fairness argument for which she relies on Boucher v. Dramstad (D.Mont. 1981), 522 F. Supp. 604. Her reliance on Boucher is misplaced.
Boucher originally involved an action under the Montana Tort Claims Act. Following an unfavorable result on appeal based on a somewhat technical rule of law addressed for the first time in that case by this Court, Boucher filed a federal civil rights action based on the same facts as his state court claim. The defendants raised res judicata as a bar.
The federal district court noted a difference of opinion among the Circuit Courts of Appeal on the question of whether res judicata barred a § 1983 action in federal courts where the constitutional claims underlying the action could have been raised in an earlier state court proceeding, but were not. Citing the Ninth Circuit's rule that res judicata would bar Boucher's § 1983 action, the federal district court nonetheless found that, on the facts before it, application of the doctrine of res judicata would result in manifest unfairness to the plaintiff. Boucher, 522 F. Supp. at 607. The court expressed its concern that res judicata would result in plaintiff never having had an opportunity to have his claim evaluated by a court.
Neither the facts nor the law in Boucher is applicable here. Most importantly, Whirry has had an opportunity to have her claim of negligence against Swanson evaluated; indeed, she prevailed on that claim in justice court. Thus, even if "manifest unfairness" were the test for application of res judicata by this Court, that test would not be met here. In addition, it must be noted that the Boucher court relied on federal cases, cases neither controlling nor persuasive *1230 under the facts before us. We conclude that the justice court was a court of competent jurisdiction for determining Whirry's third-party claim against Swanson.
We hold that the District Court did not err in concluding that res judicata barred the action before it.

II.
Did the District Court's application of res judicata violate Whirry's right to due process?
Whirry argues that the District Court violated her right to due process by denying her right to raise issues and litigate her action, to prove liability, and to prove the extent of her damages. Whirry relies on our conclusion in Boyer v. Kargacin (1982), 202 Mont. 54, 656 P.2d 197, that a grant of summary judgment to plaintiff in that case foreclosed the opportunity for a hearing on the merits of defendant's case and violated his right to due process. Boyer is inapposite here.
In Boyer, the plaintiff was granted a temporary restraining order against defendant who parked his car across the ingress to plaintiff's business. The temporary order evolved into a continuing restraining order. On appeal of that order, this Court upheld the order but remanded with directions to expedite the trial of the cause for damages. On remand, the district court granted plaintiff summary judgment on the issue of defendant's liability due to its misinterpretation of our instructions on remand; the court believed that we had already resolved the issue of liability in plaintiff's favor. On the second appeal, we reversed, concluding that defendant had had no opportunity to be heard on the issue of liability and, therefore, that his right to due process was violated.
In Boyer, the issue of defendant's liability was never heard or resolved on the merits at any stage. Here, plaintiff pleaded Swanson's negligence in justice court and moved for and was granted summary judgment on that basis.
Whirry is correct that she may have had a more extensive recovery had she filed her action in the District Court in the first instance. But she chose to file against Swanson in justice court for the total amount of $470.80. The justice court ultimately entered final judgment in Whirry's favor. To allow her to file another action based on the same facts for additional damages would permit her to relitigate her case. Due process does not require such a result. We hold that the District Court's application of res judicata did not violate Whirry's right to due process.
Affirmed.
TURNAGE, C.J., and HARRISON, McDONOUGH and WEBER, JJ., concur.
HUNT, Justice, dissenting.
I dissent. The pursuit of justice has always been a pursuit of fairness within logical parameters. Today's decision instead ignores this goal of jurisprudence and reflects inherent unfairness. The majority opinion fails to recognize a crucial factor in res judicata determination  that the previous judgment be made on the merits. Instead, it subjects itself to the ease of a deficient four-prong test with no concern for logic or fairness. The majority simply states four requisite criterion for the binding effect of res judicata and satisfies itself without a deeper inspection of the larger issues of justice underlying the plaintiff's claim. Most jurisdictions require that prior judgments be on the merits.
Furthermore, this case was tried in Justice Court. Thus, with no record before it, the District Court had no means of recognizing exactly what was adjudicated on the merits. It could not have known at all whether or not the case was tried on the merits. At most, the District Court was presented with a general ruling from below, not enough to substantiate a summary judgment ruling on res judicata.
The majority's result deprives the plaintiff of a full and fair adjudication of her rightful allegation against the defendant. Its ruling today is facially insufficient to pretend to support traditional notions of justice. I would reverse the District *1231 Court's ruling and remand for a proper determination of the plaintiff's claim.
TRIEWEILER, Justice, dissenting.
I also dissent from the opinion of the majority. I concur with Justice Hunt's conclusion that the majority decision is unfair and does not serve the purposes for which the principle of res judicata was established. However, the majority opinion is also legally incorrect.
The majority concedes that in order to prove that Whirry's claim is barred by res judicata Swanson had to establish, among other things, that the issues adjudicated in the Justice Court were the same issues that Whirry sought to adjudicate in the District Court. Swanson also had to establish that the prior judgment came from a court of competent jurisdiction. In this case, neither element was proven.
Whirry's action in the Justice Court was solely for the purpose of seeking indemnity for a medical bill from one of the health care providers who had treated her. In the District Court, she sought damages for the remainder of her medical expenses, loss of wages and future earning capacity, pain and suffering, loss of her established course of life, and punitive damages. These claims all presented issues different from those which were litigated in the Justice Court action. Additionally, there was no proof by the defendant, nor any basis in the pleadings for establishing that the Justice Court had jurisdiction to adjudicate these additional claims had they been presented. Pursuant to § 3-10-301(1)(c), MCA, justice courts, at the time that this case was litigated, could not consider claims based on injury to the person where the amount in dispute exceeded $3500. In order to grant judgment on the pleadings, it had to be plain from the pleadings that plaintiff's claim did not exceed that amount in order to establish that the Justice Court had jurisdiction to consider all the issues raised in the District Court action.
The majority concludes that:
It is clear that the essential and fundamental issue in both Whirry complaints against Swanson is Swanson's negligence in causing the accident and Whirry's injuries. Determination of this issue is dispositive in both actions. The issue of Swanson's negligence having been raised and determined in Whirry's justice court action, we conclude that the identity of issues required for application of res judicata is met.
The majority's conclusion confuses res judicata with collateral estoppel. The fact that one issue (negligence) was resolved in the previous action does not bar consideration of issues which were not resolved in a subsequent action. It simply means that the defendant is collaterally estopped from denying liability in the second action. The fact that the issue of negligence was previously raised and determined does not address the issue of Whirry's damages and should not preclude her from raising those issues in a court of competent jurisdiction.
I agree that the majority's conclusion is unfair. However, I also conclude that it is legally and logically indefensible, and therefore, dissent from the majority opinion.
