
207 Kan. 54 (1971)
483 P.2d 1119
DANNY R. PENACHIO and KATHLEEN R. PENACHIO, Appellants,
v.
ROBERT G. WALKER, Appellee.
No. 45,923
Supreme Court of Kansas.
Opinion filed April 10, 1971.
Otto J. Koerner, of Wichita, argued the cause, and G.E. Carnahan, of Wichita, was with him on the brief for the appellants.
Thomas H. Graber, of Wichita, argued the cause, and Theodore H. Hill and Merle D. Mason, both of Wichita, were with him on the brief for the appellee.
The opinion of the court was delivered by
HATCHER, C.:
This appeal stems from an action by the parents of a four year old daughter for her wrongful death.
The facts are not in dispute.
On March 28, 1968, Glenda Kaye Penachio, a pedestrian four years of age, was struck and severely injured by a motorcycle operated by the defendant, resulting in her death on April 1, 1968. The defendant was an uninsured motorist and Farmers Insurance Exchange had in effect at the time of the death an automobile insurance policy providing for uninsured motorist coverage for *55 plaintiffs and family. Pursuant thereto the sum of $8,000.00 was paid to Danny R. Penachio and Kathleen R. Penachio, the parents of the deceased, Glenda Kaye Penachio.
Thereafter the Farmers Insurance Exchange filed an action against the defendant, Robert G. Walker, to recover the $8,000.00 which they had paid. The action was filed in the name of the insuror for subrogation as authorized by K.S.A. 1968 Supp. 40-287. The petition alleged the facts as above stated and prayed for judgment in the amount of $8,000.00 and costs.
The defendant answered alleging as an affirmative defense that the injuries and death resulted from Glenda's and her parents' negligence or contributory negligence. The answer also alleged in the alternative that plaintiff, the insuror, had no right of subrogation.
The defendant then filed interrogatories with plaintiffs' answers. They read in part:
"4. Under what part of the policy in question did plaintiff pay the amount claimed?
"ANSWER:
"Under the uninsured motorist coverage.
"5. To whom was the check paid to and what was the date of payment?

"ANSWER:
"Danny R. Penachio and Kathleen R. Penachio, 10-25-68.
"6. What elements of damages was the amount paid for?
"ANSWER:
"Compromise settlement which was not itemized, but within the $10,000.00 uninsured motorist coverage limit." (Emphasis supplied.)
The part of the policy in which we are immediately interested reads:
"(3) Payment of Loss: Loss arising out of bodily injury, sickness or disease is payable to the insured, or if the insured be a minor, to his parents or guardian; and loss arising out of death is payable to the surviving spouse, if any, of the insured, if a resident of the same household at the time of the accident, otherwise to the insured's estate." (Emphasis supplied.)
Following the filing of the answer to the defendant's interrogatories the defendant, on May 6, 1969, filed a motion for summary judgment which was granted and journalized by the trial court on June 5, 1969. The trial court did not state a reason for granting the summary judgment. However, we find a narrative statement in the record, which does not appear to be disputed, that reads:
"That defendant's Motion for Summary Judgment was sustained on the grounds Farmers Insurance Exchange had not paid pursuant to the terms of their policy and therefore, the payment was a volunteer payment...."
*56 The insurer had paid to parents rather than to the estate of the four year old child.
No appeal was taken from the motion for summary judgment against the plaintiff, insurance carrier, and the judgment became final.
In the meantime, May 23, 1969, the parents of Glenda brought an action under the wrongful death statute (K.S.A. 60-1901, et seq. and K.S.A. 1967 Supp. 60-1903) for the recovery of damages for death in the amount of $35,000.00 and medical and general expenses in the amount of $1,973.31. The petition also prayed for punitive damages in the amount of $35,000.00.
The defendant answered by way of a general denial and alleged negligence on the part of the child and the parents as an affirmative defense. Later, the defendant filed an amended answer which supplemented its original answer with the following:
"That the plaintiffs are barred from the prosecution of this suit; the matter being res adjudicata.

"That the plaintiffs are barred from the recovery herein by the doctrine of collateral estoppel; there being a prior case between the plaintiffs, their insurance carrier, and the defendant, having been determined adversely to the plaintiffs and their insurance carrier, the Farmers Insurance Exchange, Case No. C-15844."
When the matter came on for pretrial the defendant moved to dismiss the plaintiffs' cause of action for the reason they were barred by the judgment in the insuror's action for subrogation.
The trial court sustained defendant's motion to dismiss, concluding:
"That the adjudication made in the case entitled Farmers Insurance Exchange v. Robert G. Walker, Case No. C-15844 is binding upon the Plaintiffs herein and upon the basis of Collateral estoppel and res adjudicata the Plaintiffs are barred from proceeding herein."
It is the appeal from this order dismissing plaintiffs' petition that we now have before us for review.
Perhaps before considering the legal question, we should first consider the specific issue to which the facts and the law are to be applied.
The trial court dismissed the action because the plaintiffs, the parents, were barred from proceeding on the basis of collateral estoppel and res judicata. Courts have sometimes used the two terms synonymously and if a party is barred from relitigating a matter it can make little difference to him by what name the lethal *57 doctrine is called. However, the two doctrines have different application and a distinction should be recognized. The doctrine of res judicata is a bar to a second action upon the same claim, demand or cause of action. It is founded upon the principle that the party, or some other with whom he is in privity, has litigated, or had an opportunity to litigate, the same matter in a former action in a court of competent jurisdiction. The doctrine of collateral estoppel is a bar in an action upon a different claim as to certain matters in issue which were determined in a former judgment. The distinction between res judicata and collateral estoppel is based on the distinction between a cause of action and issues in a cause of action. (James, Civil Procedure, § 11.18, p. 575; 46 Am.Jur.2d, Judgments, § 398, p. 566; 50 C.J.S., Judgments, § 593, p. 13.)
Although collateral estoppel is not as broad in scope as the doctrine of res judicata, the necessary elements which make the two doctrines applicable are much the same. Without reviewing all of the necessary elements it will suffice for the purpose of this opinion to state that there must be a judgment on the merits which determines the rights and liabilities of the parties based on the ultimate facts as disclosed by the pleadings or issues presented for trial, James, Civil Procedure, § 11.19, p. 576 and § 11.20, p. 579; 50 C.J.S., Judgments, § 627, p. 52, and neither doctrine operates to affect those who were neither parties nor in privity therein. (50 C.J.S., Judgments, § 762, p. 288.) In Wells, Administrator v. Ross, 204 Kan. 676, 465 P.2d 966, we stated at page 678:
"The doctrine of res judicata is a rule of public policy. It is to the interest of the state that there be an end to litigation and an end to the hardship on an individual being vexed more than once for the same cause. The doctrine is, therefore, to be given a liberal application but not applied so rigidly as to defeat the ends of justice.
"The doctrine means that, if an action is brought, the merits of the question are discussed and a final judgment is obtained by either party, the parties are concluded and cannot again canvass the same question in another action. In Kenoyer v. Board of Barber Examiners, 176 Kan. 424, 271 P.2d 267, we stated:
"`This state has long followed the rule that to make a matter res judicata there must be a concurrence of four conditions, namely, (1) identity in the thing sued for; (2) identity of the cause of action; (3) identity of persons and of parties to the action, and (4) identity of the quality in the persons for or against whom the claim is made. (A.T. & S.F. Rld. Co. v. Comm'rs of Jefferson Co., 12 Kan. 127; Hofstetter v. Myers Construction, Inc., 170 Kan. 464, 227 P.2d 115.)' (p. 427.)"
*58 We must agree with the appellants that the disposal of the action brought by the Farmers Insurance Exchange did not determine on the merits the claim of appellants against the appellee for the death of their minor daughter and the appellants were not parties or in privity with the plaintiff in the former action.
The Farmers Insurance Exchange brought the first action on the theory of subrogation. The trial court held that the company had not paid the money to the proper party therefore it had no right to subrogation. It will be understood that the validity of this determination is not before us. The determination could not, however, under any possible theory, be a determination of the liability of the defendant for the negligent wrongful death of the four year old child. All that the trial court found was that the Farmers Insurance Exchange was not a subrogee and therefore had no standing to sue. Privity means a mutual or successive relationship to the same legal rights. In 46 Am. Jur., Judgments, § 508, p. 662, we find the following statement:
"The general rule is that a judgment rendered because of a defect of parties does not operate to bar a subsequent action. This rule prevails whether the judgment is based upon a want of parties, a misjoinder of parties, a temporary disability of the plaintiff to sue, or a mistake of the plaintiff as to the character or capacity in which he brings suit...."
The very reason for the decision in favor of the defendant in the previous case refutes the appellee's contention that the appellants were in privity with the plaintiff. The trial court found that the Farmers Insurance Exchange was not a subrogee and had no right to subrogation. In Old Colony Ins. Co. v. Kansas Public Ser. Co., 154 Kan. 643, 121 P.2d 193, we state at page 646:
"To what rights of Winter did the insurance company become subrogated by virtue of its voluntary payment to Winter? The doctrine of subrogation is not invoked in favor of a mere volunteer. Payment for which subrogation is claimed must have been made under compulsion, or for the protection of some interest of the party making it and in discharge of an existing liability. This rule is well established. (Safe Deposit Co. v. Thomas, 59 Kan. 470, 476, 53 Pac. 472;..."
If there was no right of subrogation, the Farmers Insurance Exchange was a stranger or mere interloper insofar as the appellants here were concerned and no privity between the parties could exist.
We find no basis for the application of the doctrine of res judicata or collateral estoppel.
The judgment is reversed with instructions to proceed with the trial of the case on its merits.
APPROVED BY THE COURT.
