
424 N.W.2d 795 (1988)
Douglas W. WESSLING, et al., Respondents,
v.
Phillip E. JOHNSON, et al., Defendants,
BBCA, Inc., Appellant.
No. C3-87-2350.
Court of Appeals of Minnesota.
May 31, 1988.
Review Denied July 28, 1988.
*796 Wallace F. Gustafson, Gustafson & Waechter, Willmar, for respondents.
Linda J. Hines, Bloomington, for appellant.
Heard, considered and decided by RANDALL, P.J., and LOMMEN and THOREEN,[*] JJ.

OPINION
RANDALL, Judge.
BBCA,[1] Inc. (BBCA), a Minnesota corporation, appeals a state court dismissal of its counterclaim against Douglas and Debra Wessling (Wesslings) for claimed deficiencies on a contract for deed where the Wesslings were vendees. Appellant counterclaimed when the Wesslings sued it in state court as part of an action to quiet title. Upon the Wesslings' motion, the state court, noting that BBCA's earlier federal court action involving the same land had been dismissed for lack of prosecution, dismissed BBCA's state court counterclaim as res judicata.

FACTS
This dispute arose over land in Kandiyohi County. In 1979, Phillip E. and Gloria J. Johnson (Johnsons), as vendors, sold the property under a contract for deed to the Wesslings, as vendees. Between 1979 and 1981, several purported transfers affected this property. Johnson transferred his vendor's interest to himself as trustee for Life Science Church of Cedar Hills, Order of Almighty God, Chapter 5194, Spicer, Minnesota, and then "transferred" that interest to a Joan M. Noske, trustee of the BBCA, Order of Almighty God, Chapter 7024, Richmond, Minnesota. Noske quit claimed the real estate to BBCA.
Between February 1982 and September 1984, the Internal Revenue Service (IRS) placed various federal tax liens on the property, claiming at different times that the delinquent taxpayer was Phillip Johnson, Gloria Johnson, and BBCA, Inc., as nominees of Phillip and Gloria Johnson.
In February 1985, BBCA sued the United States in federal district court to quiet title to the property. At this time, the Wesslings stopped payment under the contract for deed and notified the United States government and BBCA that it was with-holding *797 payments until title in the property could be ascertained.
On May 27, 1986, the IRS had sold the property at public auction to the Wesslings. BBCA did not challenge the auction procedure and did nothing during the redemption period to reclaim the property.
On May 4, 1987, the Wesslings sued Johnson, BBCA, and all others in the chain of title, in state court to quiet title to the property. In its answer, BBCA counterclaimed against the Wesslings for claimed deficiencies under the original contract for deed. Wessling, by motion and an affidavit, moved for summary judgment alleging that BBCA's counterclaim was barred as res judicata. On May 21, 1987, BBCA's suit was dismissed by a federal judge sua sponte for lack of prosecution. On October 22, 1987, Wessling's motion for summary judgment against BBCA's counterclaim was granted.

ISSUE
Is appellant's state court counterclaim for unpaid monies under the original contract for deed barred by the principle of res judicata?

ANALYSIS
A claim is barred by res judicata when: (1) there has been a final judgment on the merits, (2) the same cause of action is involved, and (3) the parties are identical. Minneapolis Auto Parts Co. v. Minneapolis, 739 F.2d 408, 409 (8th Cir.1984) (applying Minnesota law). To prevail, BBCA needs to defeat any one of these three elements.

1. Final Judgment on the Merits.

The federal lawsuit preceding this case was dismissed under Fed.R.Civ.P. 41(b), sua sponte for lack of prosecution. That order of dismissal provided the parties 10 days to move for relief from the order. BBCA declined to take any action. Now, the issue before us is whether the federal court's dismissal for lack of prosecution operates as an adjudication on the merits, or dismissal with prejudice, thus barring BBCA's relitigating in state court the issue of whether it still has any interest in this property.
Fed.R.Civ.P. 41(b) concerns dismissals for lack of prosecution, and provides:

Unless the court in its order for dismissal otherwise specifies, a dismissal under this subdivision * * * operates as an adjudication upon the merits.

(Emphasis added.) We realize the authorities are mixed as to whether dismissal for lack of prosecution constitutes an adjudication on the merits for res judicata purposes.
We find the predominant rule to be that such a dismissal is an adjudication upon the merits. In Costello v. United States, 365 U.S. 265, 81 S.Ct. 534, 5 L.Ed. 2d 551 (1961), Justice Brennan noted:
We do not discern in Rule 41(b) a purpose to change this common-law principle with respect to dismissals in which the merits could not be reached for failure of the plaintiff to satisfy a precondition. All dismissals enumerated in Rule 41(b) which operate as adjudications on the merits  failure of the plaintiff to prosecute, or to comply with the Rules of Civil Procedure, or to comply with an order of the Court, or to present evidence showing a right to the relief on the facts and the law  primarily involve situations in which the defendant must incur the inconvenience of preparing to meet the merits because there is no initial bar to the Court's reaching them. It is therefore logical that a dismissal on one of these grounds should, unless the Court otherwise specifies, bar a subsequent action. In defining the situations where dismissals "not provided for in this rule" also operate as adjudication on the merits, and are not to be deemed jurisdictional, it seems reasonable to confine them to those situations where the policy behind the enumerated grounds is equally applicable. Thus a sua sponte dismissal by the Court for failure of the plaintiff to comply with an order of the Court should be governed by the same policy.
Costello, 365 U.S. at 286-87, 81 S.Ct. at 545. See also Kimmel v. Texas Commerce Bank, 817 F.2d 39 (7th Cir.1987).
*798 We note that some jurisdictions do not consider a dismissal for lack of prosecution the equivalent of a full and final adjudication on the merits for purposes of examining the defense of res judicata. Typically, these jurisdictions find that such action is merely procedural in nature and does not operate as a full adjudication. See Harl v. City of La Salle, 679 F.2d 123, 125-26 (7th Cir.1982).
Minnesota law indicates that the federal court dismissal acts as an adjudication on the merits. First, Minn.R.Civ.P. 41.02 is similar to the federal rule and provides that a dismissal for lack of prosecution "operates as an adjudication upon the merits." Second, the Minnesota Supreme Court has held that dismissals under this rule operate as an adjudication on the merits. Voth v. Beckman, 250 Minn. 325, 326-27, 84 N.W. 2d 925, 926 (1957).[2] The rationale of Costello is more persuasive than those decisions which hold that dismissal for lack of prosecution is not an adjudication on the merits.

2. Same Parties.

The second requirement of res judicata is uniformity of parties. The parties must be identical or in privity with one another. McMenomy v. Ryden, 276 Minn. 55, 58, 148 N.W.2d 804, 807 (1967). The supreme court, in McMenomy, adopted the following test:
In general, it may be said that such privity involves a person so identified in interest with another that he represents the same legal right.
Id. at 58-59, 148 N.W.2d at 807, quoting 30A Am.Jur. Judgments § 399. Determination of privity requires careful examination on a case-by-case basis. Id. at 58-59, 148 N.W.2d at 807, quoting SD C.J.S. Judgements § 788.
In the federal suit, the parties were BBCA and the United States. In the state suit, the parties are the Wesslings, BBCA, and others in the chain of title. The Wesslings and the IRS are in privity since the Wesslings purchased at the IRS tax auction. BBCA is in privity with the others in the state court suit, since title passed through those entities to BBCA.

3. Same Claims.

The final element of res judicata is that there be a unity of claims, or causes of action. The test for comparing the two causes of action is whether the primary right and duty and the delict or wrong combined are the same in each action. Johansen v. Production Credit Association of Marshall-Ivanhoe, 378 N.W.2d 59, 61 (Minn.Ct.App.1985). Further, claims are identical when they arise from the same transaction, i.e., when the same operative nucleus of facts is alleged in support of the claims. Anderson v. Werner Continental, Inc., 363 N.W.2d 332, 335 (Minn.Ct.App. 1985), pet. for rev. denied (Minn. June 24, 1985). A frequently used test is whether the same evidence will support both judgments. Amalgamated Meat Cutters & Butcher Workmen of North America v. Club 167, Inc., 295 Minn. 573, 575, 204 N.W.2d 820, 821 (1973). Finally, identity of claims is present not only for those issues actually litigated, but also every matter which might have been litigated. Mattsen v. Packman, 358 N.W.2d 48, 49 (Minn.1984) (citations omitted).
Both the state and federal actions were to quiet title to the same property in Kandiyohi County. Although BBCA's state counterclaim was for payments due under the contract for deed, its success depends solely on somehow invalidating the IRS tax lien foreclosure and public sale to Wessling. If this cannot be done, BBCA has no interest in the property to sell or sue on.
Finally, in Scott-Peabody & Associates v. Northern Leasing Corp., 273 Minn. 236, *799 140 N.W.2d 614 (1966), an action to set aside a deed as void and in fraud of creditors was held barred by res judicata, since title to the property had been previously quieted in a quiet title action in which the plaintiff was a party. The court held that the plaintiff had the opportunity to assert the issue of fraudulent conveyance in the quiet title action. Id. at 240, 140 N.W.2d at 617. Failure to do so barred as assertion of that claim in a second action. If a fraudulent conveyance claim is barred under res judicata by virtue of a prior quiet title action, then a contract for deed claim is barred where a prior action involved quieting title in the relevant property.
BBCA first claims that res judicata is inapplicable here, but argues in the alternative that, even if applicable, the Wesslings waived the defense of res judicata by failing to assert it as an affirmative defense in the state action where BBCA counterclaimed. Specifically, when BBCA counterclaimed in the state action for delinquencies under the contract for deed, the Wesslings' answer did not contain the affirmative defense of res judicata. Res judicata is an affirmative defense to be asserted by answer. Mitchell v. City of St. Paul, 228 Minn. 64, 73, 36 N.W.2d 132, 137 (1949) (citations omitted). Further, Minn.R.Civ.P. 8.03 provides that res judicata is such an affirmative defense.
After the Wesslings filed an answer to the counterclaim, they did specifically raise res judicata by affidavit and in their motion for summary judgment on BBCA's counterclaim. The Wesslings' motion for summary judgment was heard and fully litigated on the issue of res judicata. BBCA did not move to strike the defense at the trial court, and now claims for the first time on appeal a failure to plead res judicata. BBCA chose to resist the Wesslings' claim of res judicata before the trial court, and, under these circumstances, we find no waiver by the Wesslings of the defense of res judicata.
BBCA argues that on this set of facts, equity should require that the doctrine of res judicata not be applied. Assuming equity here to be the sole basis for our decision to affirm the trial court, and it is not, we disagree with BBCA's claim that they are entitled to prevail on the basis of equity.
The supreme court has stated that:
The policy requiring that every party be given his "day in court" should not, of course, be defeated by an arbitrary application of the doctrine of res judicata.
Gollner v. Cram, 258 Minn. 8, 13, 102 N.W.2d 521, 525 (1960).
We find no arbitrariness here by the trial court. First of all, we note that sound policy reasons underlying the doctrine of res judicata include the interest in avoiding unnecessary litigation, the economy of judicial time, and the public policy favoring the establishment of certainty in legal relations. Johansen, 378 N.W.2d at 61. Res judicata was designed to eliminate the expense, vexation, waste and possible inconsistent results of duplicitous litigation. Id., quoting Hoag v. New Jersey, 356 U.S. 464, 470, 78 S.Ct. 829, 833, 2 L.Ed.2d 913 (1958).
We note that BBCA's federal lawsuit, wherein it had a full and open chance to clear title to the land in its own name, was dismissed for lack of prosecution. In this dismissal, the federal court allowed BBCA ten days to move for relief from that order. BBCA did nothing. Further, when the Wesslings purchased the property at the IRS tax auction, BBCA had the legal right to redeem, but did not.
When the redemption period ran on the IRS foreclosure sale, BBCA's property rights were extinguished. BBCA has nothing to convey to the Wesslings, even if it could show on its counterclaim that Wessling did not pay the complete purchase price on the contract for deed (a fact which the Wesslings do not dispute). The Wesslings' position is that, by purchasing and paying in full the IRS at the tax lien foreclosure sale, they do not also have to pay the prior contract for deed vendor whose interest was extinguished.
We find no equitable considerations favoring BBCA and affirm the trial court in all respects.


*800 DECISION
The doctrine of res judicata bars appellant's state court counterclaim.
Affirmed.
NOTES
[*]  Acting as judge of the court of appeals by appointment pursuant to Minn. Const. art. 6, § 2.
[1]  BBCA, Inc. stands for Basic Bible Church of America.
[2]  Appellant cites Beutz v. A.O. Smith Harvestore Products, Inc., 416 N.W.2d 482 (Minn.Ct.App. 1987), pet. for rev. granted, 419 N.W.2d 618 (Minn.1988) as controlling. We disagree. Beutz involved a federal court order which dismissed the lawsuit as a sanction against an attorney for failing to file a responsive memorandum. We held that a dismissal as a sanction for failure to file a legal brief was procedural and did not operate as a full and final adjudication on the merits. Here, the federal court's dismissal was for the substantial failure of lack of prosecution or going forward with one's lawsuit. These cases are distinguishable.
