                  FOR PUBLICATION
  UNITED STATES COURT OF APPEALS
       FOR THE NINTH CIRCUIT

HEADWATERS INC., an Oregon                   No. 01-35898
nonprofit corporation; FOREST                   D.C. No.
CONSERVATION COUNCIL,                       CV-01-03056-HO
              Plaintiffs-Appellants,
                                                ORDER
                v.                          WITHDRAWING
U.S. FOREST SERVICE,
               Defendant-Appellee.          OPINION AND
                                               DENYING
                                            PETITION FOR
                                              REHEARING
                                            WITH PETITION
                                           FOR REHEARING
                                            EN BANC AND
                                              OPINION

       Appeal from the United States District Court
                for the District of Oregon
     Michael R. Hogan, Chief District Judge, Presiding

                   Argued and Submitted
              July 10, 2003—Portland, Oregon

                  Filed February 23, 2005

      Before: Alfred T. Goodwin, Procter Hug, Jr., and
             Marsha S. Berzon, Circuit Judges.

                Opinion by Judge Berzon;
              Concurrence by Judge Goodwin




                            2121
2124        HEADWATERS INC. v. U.S. FOREST SERVICE


                         COUNSEL

Lori J. Cooper, Williams, Oregon, for the appellants.

Todd S. Aagaard, Attorney, United States Department of Jus-
tice, Washington, D.C., for the appellee.


                           ORDER

  The Opinion filed on September 8, 2004, and published at
382 F.3d 1020 (9th Cir. 2004), is withdrawn and superceded
by the opinion filed concurrently herewith.

  With the filing of the new opinion, appellants’ pending
petition for rehearing en banc is DENIED as moot, without
prejudice to refiling a subsequent petition for rehearing and/or
rehearing en banc. See 9th Cir. G.O. 5.3(a).
             HEADWATERS INC. v. U.S. FOREST SERVICE             2125
                              OPINION

BERZON, Circuit Judge:

   The district court held, sua sponte, that two environmental
organizations who have never litigated the validity of several
timber sales are precluded from doing so because counsel for
other organizations, a year earlier, signed a dismissal with
prejudice of a similar suit. We have in this nation a “ ‘deep-
rooted historic tradition that everyone should have his own
day in court,’ ” and presume, consequently, that “ ‘[a] judg-
ment or decree among parties to a lawsuit resolves issues as
among them, but it does not conclude the rights of strangers
to those proceedings.’ ” Richards v. Jefferson County, 517
U.S. 793, 798 (1996) (quoting Martin v. Wilkes, 490 U.S. 755,
762 (1989)). While there are narrow exceptions to this princi-
ple, usually denominated by the term “privity,” the district
court here applied the privity doctrine without establishing,
among other prerequisites, that the present plaintiffs were
adequately represented in the prior suit, and without giving
plaintiffs an opportunity to demonstrate that they were not.
We reverse, and remand for consideration of the preclusion
question after full adversary airing and a development of an
appropriate record.

                         I.   Background

   On May 13, 1999, six environmental groups and two individ-
uals1 (“American Lands plaintiffs”) filed suit against the For-
est Service challenging various timber sales, including the
Beaver-Newt and Silver Fork timber sales. American Lands
Alliance v. Williams, No. 99-697-AA (D. Or. 1999). The
plaintiffs filed an amended complaint on October 26, 1999,
  1
   The named plaintiffs were: American Lands Alliance, League of Wil-
derness Defenders, Oregon Wildlife Federation, Santiam Watershed
Guardians, Friends of Breitenbush Cascades, Klamath-Siskiyou Wildlands
Center, Gregory J. Dyson, and John Rancher.
2126       HEADWATERS INC. v. U.S. FOREST SERVICE
which advanced nine claims for relief under the National For-
est Management Act (NFMA), 16 U.S.C. §§ 1600-1687, the
National Environmental Policy Act (NEPA), 42 U.S.C.
§§ 4321-4370, and the Administrative Procedures Act (APA),
5 U.S.C. §§ 701-706, challenging nineteen United States For-
est Service logging programs in the Willamette, Mt. Hood,
Rogue River, and Siskiyou National Forests. The complaint
sought declaratory and injunctive relief requiring the Forest
Service to complete an environmental impact statement under
NEPA and otherwise to comply with NFMA, NEPA, and
APA procedural requirements before implementing the log-
ging plans. Both the Beaver-Newt and Silver Fork areas are
located within the Rogue River National Forest in southwest-
ern Oregon.

   On December 13, 1999, before any developments in the
case apart from the filing of a scheduling order and an
amended complaint — before, that is, any litigation on the
merits — and, as far as the record shows, without receiving
any concessions from the defendants, the American Lands
plaintiffs stipulated to a dismissal of their complaint with
prejudice. On January 19, 2000, District Judge Ann Aiken
issued the dismissal. The American Lands complaint was not
denominated a class action, and there is no indication that
Judge Aiken reviewed the fairness of the stipulation as it
affected third parties.

   More than one year later, on February 21, 2001, one of the
American Lands plaintiffs, the Klamath-Siskiyou Wildlands
Center (“Wildlands Center”), represented by a new attorney,
filed a new complaint regarding the Beaver-Newt and Silver
Fork timber sales, seeking declaratory and injunctive relief
under NFMA and NEPA. Klamath-Siskiyou Wildlands Center
v. United States Forest Serv., No. 01-3018-HO (D. Or. 2001).
The Forest Service moved for judgment on the pleadings
based upon res judicata, because of the Wildlands Center’s
participation in the American Lands suit. In response, on June
1, 2001, the Wildlands Center filed a motion for relief from
              HEADWATERS INC. v. U.S. FOREST SERVICE                 2127
the judgment, conceding that res judicata would bar the law-
suit but arguing that the court should grant relief from the
American Lands judgment pursuant to Federal Rule of Civil
Procedure 60(b). The Wildlands Center’s motion alleged that
the attorney in the American Lands suit did not have authority
to enter into the settlement agreement. On July 2, 2001, Judge
Michael Hogan granted the Forest Service’s motion for judg-
ment on the pleadings in Klamath-Siskiyou and dismissed the
action without prejudice. The Wildlands Center did not appeal
that judgment.

   The present record is silent as to when the plaintiffs here
(“Headwaters”)2 learned of the American Lands and Klamath-
Siskiyou litigation. On July 5, 2001, three days after Judge
Hogan dismissed the Wildlands Center’s lawsuit, Headwaters
instigated suit in the same district court in which the Ameri-
can Lands and Klamath-Siskiyou suits had been filed, using
the same lawyer and a similar complaint as in Klamath-
Siskiyou (but not as in American Lands). The current com-
plaint challenges the Beaver-Newt and Silver Fork timber
sales, the same two sales challenged by the Wildlands Center
in Klamath-Siskiyou; alleges, differently than did the Ameri-
can Lands complaint, the plaintiffs’ interest in and use of the
forests; and relates its claims to particular endangered species,
which the American Lands complaint did not do. On July 26,
2001, Judge Hogan, to whom the present case was also
assigned, dismissed the Headwaters complaint sua sponte
under the res judicata doctrine. Headwaters, Inc. v. United
States Forest Serv., 159 F. Supp. 2d 1253, 1258 (D. Or.
2001). He neither held a hearing nor received any briefing on
either the merits of the case or the applicability of res judicata.3
Id. Headwaters appeals.
   2
     There are two plaintiffs in this case, Headwaters, Inc. and the Forest
Conservation Council. The record indicates that Headwaters, but not the
Council, has been a co-plaintiff with the Klamath-Siskiyou Wildlands
Center in unrelated litigation, Headwaters, Inc. v. Bureau of Land Mgmt.,
No. 01-3063 (D. Or.).
   3
     The record in this case is silent on what happened next, but we may
take judicial notice of the American Lands docket, which shows that all
2128           HEADWATERS INC. v. U.S. FOREST SERVICE
   A district court’s judgment based upon res judicata is a
mixed question of law and fact in which legal issues predomi-
nate. Accordingly, we review the district court’s order de
novo. See Gregory v. Widnall, 153 F.3d 1071, 1074 (9th Cir.
1998); United States v. Geophysical Corp., 732 F.2d 693, 697
(9th Cir. 1984).

                             II.   Discussion

   [1] “The doctrine of res judicata provides that a final judg-
ment on the merits bars further claims by parties or their
privies based on the same cause of action,” and “is central to
the purpose for which civil courts have been established, the
conclusive resolution of disputes within their jurisdiction.” In
re Schimmels, 127 F.3d 875, 881 (9th Cir. 1997) (internal
quotation marks omitted). The elements necessary to establish
res judicata are: “(1) an identity of claims, (2) a final judg-
ment on the merits, and (3) privity between parties.” Tahoe-
Sierra Pres. Council, Inc. v. Tahoe Reg’l Planning Agency,
322 F.3d 1064, 1077 (9th Cir. 2003) (quotation marks and
citation omitted); W. Radio Servs. Co. v. Glickman, 123 F.3d
1189, 1192 (9th Cir. 1997). We shall discuss each element in
turn, but, as we shall explain, the central issue is whether, as
required to find privity, Headwaters was adequately repre-
sented in the earlier litigation.

A.     Identity of Claims

   In determining whether a present dispute concerns the same
claims as did prior litigation, the Ninth Circuit considers:

the original plaintiffs in that case filed a motion for relief from the earlier
dismissal on July 9, 2001, four days after the Headwaters complaint was
filed. See Biggs v. Terhune, 334 F.3d 910, 915 n.3 (9th Cir. 2003)
(“Materials from a proceeding in another tribunal are appropriate for judi-
cial notice.”). The American Lands plaintiffs withdrew that motion on
August 9, 2001, after the district court’s sua sponte dismissal of this case.
              HEADWATERS INC. v. U.S. FOREST SERVICE                   2129
      (1) [W]hether rights or interests established in the
      prior judgment would be destroyed or impaired by
      prosecution of the second action; (2) whether sub-
      stantially the same evidence is presented in the two
      actions; (3) whether the two suits involve infringe-
      ment of the same right; and (4) whether the two suits
      arise out of the same transactional nucleus of facts.
      The last of these criteria is the most important.

Costantini v. Trans World Airlines, 681 F.2d 1199, 1201-02
(9th Cir. 1982) (internal citation omitted).

   [2] Headwaters’ complaint alleges an infringement of the
same right and arises out of the same nucleus of facts present
in both the American Lands and Klamath-Siskiyou litigation.
The complaint in this case challenges the timber sales on the
grounds that the Forest Service violated NEPA, NFMA, and
the APA. All three of these claims were present in the prior
suits. Further, the Beaver-Newt and Silver Fork timber sales
are part of the underlying “nucleus of facts” that forms the
basis for all three of these suits. Accordingly, an identity of
claims exists.

B.    Final Judgment on the Merits

   [3] The district court in American Lands entered a final
judgment when it dismissed the action with prejudice pursu-
ant to the stipulated dismissal. We have held that a stipulated
dismissal of an action with prejudice in a federal district court
generally constitutes a final judgment on the merits and pre-
cludes a party from reasserting the same claims in a subse-
quent action in the same court. See Concha v. London, 62
F.3d 1493, 1507-08 (9th Cir. 1995).4
  4
    We note that a stipulated dismissal “with prejudice” under Rule 41 of
the Federal Rules of Civil Procedure may not have res judicata effect,
even for the named parties in that suit, in another court. In Semtek Interna-
tional, Inc. v. Lockheed Martin Corp., 531 U.S. 497 (2001), the Supreme
2130           HEADWATERS INC. v. U.S. FOREST SERVICE
C.     Privity

  1.    General principles

   [4] “ ‘Privity’ . . . is a legal conclusion ‘designating a per-
son so identified in interest with a party to former litigation
that he represents precisely the same right in respect to the
subject matter involved.’ ” Schimmels, 127 F.3d at 881 (quot-
ing Southwest Airlines Co. v. Tex. Int’l Airlines, Inc., 546
F.2d 84, 94 (5th Cir. 1977)). Privity, traditionally, arose from
a limited number of legal relationships in which two parties
have identical or transferred rights with respect to a particular
legal interest, chiefly: co-owners and co-tenants of property;
decedents and their heirs, successors in interest and survival
claimants; bailors and bailees; joint obligees; assignors and
assignees; parties to a contract, and in some cases promisees
and third-party beneficiaries; indemnitors and indemnitees;
corporations and their officers or shareholders; partners and
their partnerships; and unincorporated associations and their
members. See RESTATEMENT (SECOND) OF JUDGMENTS, §§ 43-61
(1982); see also FED. R. CIV. P. 23.2 (governing actions
affecting associations).

  However, “the term ‘privity’ is now used to describe vari-
ous relationships between litigants that would not have come
within the traditional definition of that term.” Richards, 517

Court noted that although such dismissals are commonly denominated
adjudications “on the merits,” only a judgment that “actually passes
directly on the substance of a particular claim before the court . . . triggers
the doctrine of res judicata or claim preclusion.” Id. at 501-02 (alterations
and citation omitted). Consequently, a dismissal with prejudice in federal
court “bar[s] refiling of the same claim in” the same district court, but is
only “a necessary condition, not a sufficient one, for claim-preclusive
effect in other courts.” Id. at 506. As this case was filed in the same dis-
trict court as the one claimed to be preclusive, however, the otherwise
important distinction made in Semtek is not pertinent to this prong of the
inquiry.
              HEADWATERS INC. v. U.S. FOREST SERVICE                    2131
U.S. at 798. Richards cited two sources for this statement: the
Restatement (Second) of Judgments and Martin v. Wilks, 490
U.S. 755 (1989). The former adds to the traditional privity
categories circumstances in which “[a] person who is not a
party to an action . . . is represented by a party,” including
trustees and beneficiaries, other fiduciary relationships and
consensual or legal representational relationships, and “[t]he
representative of a class of persons similarly situated, desig-
nated as such with the approval of the court, of which the per-
son is a member.” RESTATEMENT (SECOND) OF JUDGMENTS
§ 41(1). Martin, in the portion quoted in Richards, adds “cer-
tain limited circumstances [in which] a person, although not
a party, has his interests adequately represented by someone
with the same interests who is a party,” including “ ‘class’ or
‘representative’ suits” and “control of litigation on behalf of
one of the parties in the litigation,” as well as “special reme-
dial scheme[s] . . . expressly foreclosing successive litigation
by nonlitigants, as for example in bankruptcy or probate.” 490
U.S. at 762 n.2.

   [5] Irwin v. Mascott, 370 F.3d 924 (9th Cir. 2004), recently
summarized the amalgam of circumstances, broader than tra-
ditional privity relationships, that have been referred to in our
cases as “virtual representation.”5 “A non-party can be bound
   5
     Trenchant opinions from other circuits in recent years have questioned
the utility of the term “virtual representation” and the concepts it has
encompassed, especially in light of the Supreme Court’s analysis in Rich-
ards. See Becherer v. Merrill Lynch, Pierce, Fenner & Smith, Inc., 193
F.3d 415, 422-24 (6th Cir. 1999) (en banc); id. at 431-32 (Moore, J., con-
curring in the judgment); Tice v. Am. Airlines, Inc., 162 F.3d 966, 966 (7th
Cir. 1998); Bittinger v. Tecumseh Prods., 123 F.3d 877, 880-82 (6th Cir.
1997); see also Tyus v. Schoemehl, 93 F.3d 449, 458-59 (8th Cir. 1996)
(Henley, J., concurring in result). Judge Wood has written for the Seventh
Circuit that the “virtual representation” concept is “amorphous,” “illus-
trates the harm that can be done when a catchy phrase is used to describe
a perfectly sensible result,” and “cast[s] more shadows than light on the
problem to be decided.” Tice, 162 F.3d at 970-71. For present purposes,
however, we use the term as it is used in Irwin — to capture the factors
that, in addition to traditional privity relationships, justify the preclusion
in later litigation of parties not of record in an earlier case.
2132        HEADWATERS INC. v. U.S. FOREST SERVICE
by the litigation choices made by his virtual representative,”
id. at 929, only if certain criteria are met: “[A] close relation-
ship, substantial participation, and tactical maneuvering all
support a finding of virtual representation; identity of interests
and adequate representation are necessary to such a finding.”
Id. at 930.

   [6] As this summary indicates, parallel legal interests alone,
identical or otherwise, are not sufficient to establish privity,
or to bind a plaintiff to a decision reached in another case
involving another plaintiff. See Favish v. Office of Indep.
Counsel, 217 F.3d 1168, 1171 (9th Cir. 2000) (refusing to
find privity where the former and present litigants shared only
“an abstract interest in enforcement” of the same legal
requirement) (quoting United States v. ITT Rayonier, Inc., 627
F.2d 996, 1003 (9th Cir. 1980)); see also Tice v. Am. Airlines,
Inc., 162 F.3d 966, 971 (7th Cir. 1998).

  2.   Adequacy of Representation

   [7] Richards holds that adequate representation is a due
process prerequisite to precluding a litigant from his day in
court if he was not a party to the earlier litigation. 517 U.S.
at 800-01. We understand Irwin’s adequate representation
prong, see 370 F.3d at 930, as subsuming Richards’s due pro-
cess requirements.

   Richards considered a taxpayer class action challenging a
county tax on federal constitutional grounds. The county
claimed Richards’s suit was precluded by an earlier case in
which the city of Birmingham and three other taxpayers (not
claiming to represent a class) litigated and lost a state-law
challenge to the tax. The Court rejected this argument,
emphasizing that the prior individual plaintiffs gave no notice
to Richards’s class that they intended to represent and litigate
on behalf of the class, id. at 799, and that there was no indica-
tion the court hearing the first case “took care to protect the
interests of” the Richards plaintiffs. Id. at 802. Thus, “to con-
            HEADWATERS INC. v. U.S. FOREST SERVICE           2133
tend that the plaintiffs in [the earlier litigation] somehow rep-
resented petitioners, let alone represented them in a
constitutionally adequate manner, would be ‘to attribute to
them a power that it cannot be said that they had assumed to
exercise.’ ” Id. at 802 (quoting Hansberry v. Lee, 311 U.S. 32,
46 (1940)). As the two sets of plaintiffs were otherwise “best
described as mere strangers to one another,” the Court was
“unable to conclude that the [earlier] plaintiffs provided repre-
sentation sufficient to make up for the fact that [the later
plaintiffs] neither participated in, nor had the opportunity to
participate in, the [earlier] action.” Id. (citations and internal
quotation marks omitted).

   [8] The district court noted, as one reason for finding that
Headwaters had been adequately represented, that the plain-
tiffs in both cases seek “vindication of the public right to
require” a federal agency to follow federal law. We reject the
invitation to craft a “public right” exception to the due process
requirement of adequate representation. Richards itself
involved a question that pertained to all taxpayers, and the
public nature of that question did not lead the Supreme Court
to create an exception to its adequate representation holding.

  3.   Sua Sponte Dismissal

   [9] As our discussion to this point indicates, the requisites
for finding nontraditional forms of privity, outlined in Irwin,
are not readily determined from pleadings. For that reason,
sua sponte dismissal of subsequent actions such as this one,
filed by parties not involved in the prior litigation, is not
appropriate.

   [10] As a general matter, a court may, sua sponte, dismiss
a case on preclusion grounds “where the records of that court
show that a previous action covering the same subject matter
and parties had been dismissed.” Evarts v. W. Metal Finish-
ing Co., 253 F.2d 637, 639 n.1 (9th Cir. 1958) (emphasis
added). However, “[w]here no judicial resources have been
2134           HEADWATERS INC. v. U.S. FOREST SERVICE
spent on the resolution of a question, trial courts must be cau-
tious about raising a preclusion bar sua sponte, thereby erod-
ing the principle of party presentation so basic to our system
of adjudication.” Arizona v. California, 530 U.S. 392, 412-13
(2000). Our research failed to find a single case in which this
court has upheld a dismissal for claim or issue preclusion
where the parties were not given any opportunity to be heard
on the issue.6

   Here, of course, the parties were not the same, and the
problem is not simply that no argument was permitted but that
the pertinent facts necessary to make a privity determination,
outlined above, were not investigated. The district court’s
order of dismissal recounted only the following pertinent
facts: That it had heard argument in a “similar case,”
Klamath-Siskiyou; that Headwaters had hired the Wildlands
Center’s attorney; that the Headwaters complaint contained
“virtually identical claims” as the Wildlands Center’s; and
that the parties in the earlier cases were seeking to litigate
   6
     For example, in McClain v. Apodaca, 793 F.2d 1031, 1032-33 (9th Cir.
1986), we affirmed a dismissal entered after the parties filed post-trial
briefs on a res judicata question initially raised by the bankruptcy court.
Similarly, in Hawkins v. Risley, 984 F.2d 321 (9th Cir. 1993) (per curiam),
we affirmed a dismissal after the parties had “adequate opportunity to
examine and contest the application of preclusion” before the district
court. Id. at 324. Conversely, in Nevada Employees Ass’n v. Keating, 903
F.2d 1223 (9th Cir. 1990), we reversed because, by not allowing briefing
on the issue, “the trial court did not subject its res judicata decision to the
rigors of the adversarial process.” Id. at 1225; see also Favish, 217 F.3d
at 1171 (noting that district court raised collateral estoppel sua sponte but
provided the parties an opportunity to argue); Williamson v. Gen. Dynam-
ics Corp., 208 F.3d 1144, 1157 (9th Cir. 2000) (instructing that, on
remand, the parties could litigate a collateral estoppel problem first raised
by the district court). The closest we have come to endorsing a sua sponte
res judicata dismissal was in Columbia Steel Fabricators, Inc. v. Ahlstrom
Recovery, 44 F.3d 800 (9th Cir. 1995). Even there, while we affirmed a
sua sponte summary judgment in favor of a nonappearing defendant based
on collateral estoppel, we rested our opinion on the fact that the parties
who lost on summary judgment had been provided an opportunity to pre-
sent arguments against the application of preclusion. Id. at 803.
             HEADWATERS INC. v. U.S. FOREST SERVICE                2135
“ ‘not . . . any interests peculiar to themselves, but . . . the
public right to require Forest Service compliance with NEPA
[and the NFMA]’ ” (quoting Sierra Club v. Block, 576 F.
Supp. 959, 966 (D. Or. 1983)) (alteration in original). From
those considerations alone, the district court concluded that
“[t]he elements of res judicata are satisfied.”

   [11] The considerations recited by the district court are
insufficient, standing alone, to justify its conclusion. Instead,
the pertinent “virtual representation” privity factors, outlined
in Irwin, require factual development beyond the bare record.
Sua sponte dismissal was thus inappropriate.

   Of supervening importance, as the consideration is manda-
tory, see Irwin, 370 F.3d at 930, and likely to be determina-
tive, there is no record before us concerning adequate
representation considerations. Without factual development,
there is no way to determine whether the adequate
representation/due process requirements, discussed above,
were met here. We do not know whether Headwaters had
notice of the earlier suits while they were pending.7 Moreover,
it appears that the American Lands suit was dismissed with
prejudice without any consideration by the court of the issue
Headwaters now seeks to raise. See Richards, 517 U.S. at
800-01 (noting that ordinarily absent parties must have notice
of an earlier suit that could resolve their legal rights, and that,
while

      adequate representation might cure a lack of notice
      . . . . a prior proceeding, to have a binding effect on
      absent parties, would at least have to be ‘so devised
      and applied as to insure that those present are of the
      same class as those absent and that the litigation is
      so conducted as to insure the full and fair consider-
      ation of the common issue.
  7
   We do not suggest that notice alone would be sufficient to demonstrate
adequate representation. See Martin, 490 U.S. at 762-63.
2136          HEADWATERS INC. v. U.S. FOREST SERVICE
(quoting Hansberry, 311 U.S. at 43)).

   In addition to the fact that the common issue never was
considered by the court in the prior litigation, there is nothing
else in the current record to indicate that American Lands was
structured so as to protect “strangers” to that case. See Hans-
berry, 311 U.S. at 43, quoted in Richards, 517 U.S. at 801. As
in Richards, the American Lands litigation was not a class
action, even putatively.8 As a result, the district court in the
earlier case did not provide any safeguards to assure that all
parties potentially affected by the judgment were adequately
represented, as would be the case were certification of a class
sought. See FED. R. CIV. P. 23(a)(4); Amchem Prods., Inc. v.
Windsor, 521 U.S. 591, 625 (1997); Crawford v. Honig, 37
F.3d 485, 487 (9th Cir. 1994). Also, there is no indication in
the present record that the plaintiffs in the original suit
thought they were representing anyone other than themselves
and their members. Nor was there, as far as it appears, any
notice to any absent party of the proposed “settlement,” or
any indication that the district court in the prior litigation
approved the stipulation of dismissal as fair to absent parties
affected, as would have been the case had the suit proceeded
as a class action. See FED. R. CIV. P. 23(e); Ayers v. Thomp-
son, 358 F.3d 356, 369 (5th Cir. 2004); In re Mego Fin. Corp.
Sec. Litig., 213 F.3d 454, 458 (9th Cir. 2000). Under these cir-
cumstances, the district court could not determine, sua sponte
and with no factual record, that the American Lands plaintiffs
were adequately representing Headwaters, virtually or other-
wise.
  8
    In Jackson v. Hayakawa, 605 F.2d 1121 (9th Cir. 1979), we held that
an earlier case, although not formally certified under Rule 23, “was
brought as a class action and treated by the court as a class action,” and
so entitled to preclusive effect against members of the de facto class. Id.
at 1126. This case does not meet the Jackson criteria, as it was neither
filed nor treated as a class action. Further, it is not clear that Jackson is
still good law after Richards. See Tice, 162 F.3d at 972-73 (holding, after
Richards, that “[u]nless there is a properly certified class action . . . nor-
mal privity analysis must govern whether nonparties to an earlier case can
be bound to the result” (emphasis added)).
            HEADWATERS INC. v. U.S. FOREST SERVICE            2137
   Furthermore, the district court appears to have inferred that
Headwaters and the Wildlands Center have close organiza-
tional ties, based only on the fact that the two are co-plaintiffs
in a separate lawsuit. There is no record support for this infer-
ence. We know nothing else about the relationship between
the present plaintiffs and the former ones, such as whether
Headwaters and the Wildlands Center have overlapping offi-
cers. Without that information, we cannot evaluate the “close
relationship” prong of this circuit’s virtual representation/
privity analysis, as articulated in Irwin. Nor is there any
record concerning whether the present plaintiffs had any role
in the prior litigation.

   There is one final reason sua sponte dismissal was inappro-
priate: Judicial resources had not been expended on the merits
of the litigation. As noted above, the American Lands plain-
tiffs stipulated to a dismissal of their case before any litigation
on the merits — or, for that matter, any litigation activity
besides filing of a scheduling order and an amended com-
plaint — occurred. The Wildlands Center’s litigation was dis-
missed on its pleadings based on the plaintiff’s involvement
in the American Lands litigation. No judicial resources have
been spent resolving the legality of the Beaver-Newt and Sil-
ver Fork timber sales, rendering negligible the public interest
underlying res judicata. See Arizona, 530 U.S. at 412.

                       III.   Conclusion

   [12] We do not prejudge the outcome of the res judicata
issue in this case. Instead, we reverse the sua sponte dismissal
and remand to the district court for full consideration of the
question, in accord with this opinion, after an opportunity for
full briefing and argument and for appropriate factual devel-
opment. REVERSED and REMANDED.
2138       HEADWATERS INC. v. U.S. FOREST SERVICE
GOODWIN, Circuit Judge, concurring separately:

   I concur in the majority opinion, but write separately to
remind the district court on remand that if the factual record
developed after remand shows that a party or counsel were,
as suspected by the district court, in fact gaming the system
to prolong unnecessary litigation, the court has discretionary
remedies in the nature of costs and fees to protect the court
from imposition.
