
60 Cal.App.4th 1053 (1998)
CITIZENS FOR OPEN ACCESS TO SAND AND TIDE, INC., Plaintiff and Appellant,
v.
SEADRIFT ASSOCIATION et al., Defendants and Respondents.
Docket No. A077421.
Court of Appeals of California, First District, Division One.
January 14, 1998.
*1058 COUNSEL
Dotty E. LeMieux, Charles J. Post, Roger Hurt and Larry P. Manning for Plaintiff and Appellant.
Washburn, Briscoe & McCarthy, Edgar B. Washburn, Anne E. Mudge, Tesler, Sandmann & Fishman and Peter B. Sandmann for Defendants and Respondents.
OPINION
SWAGER, J.
The trial court sustained respondents' demurrer to the present action for implied dedication of a public recreational easement and declaratory and injunctive relief without leave to amend. We conclude that appellant's action is barred by a settlement incorporated into judgments entered in prior suits, and affirm the judgment.

STATEMENT OF FACTS AND PROCEDURAL HISTORY
Throughout this century a tide of controversy and litigation over the competing rights of private ownership and public access has swept over the sands of the Bolinas Sandspit, and more specifically a northwesterly part of it known as the Seadrift Sandspit. The matter now before us represents the latest wave of litigation to lap these shores.
In February of 1950, title to the Seadrift property between the ordinary high-water mark of the Pacific Ocean  known as the "Atherton Line"  and the low-water mark of the Bolinas Lagoon was quieted in the William Kent Estate Company, and soon thereafter development in the area commenced. Seadrift subsequently became a residential subdivision of over 300 parcels. *1059 Respondent Seadrift Association was organized as the fee title owner of beachfront property in the Seadrift subdivision. The remaining respondents are the individual owners of the lots within the Seadrift subdivision and members of the association which represents them.
After obtaining the quiet title decree in 1950, the William Kent Estate Company constructed a fence perpendicular to the Atherton Line to exclude the public from the private Seadrift property. A suit initiated by the State of California in 1960 to mandate removal of the fence by William Kent Estate Company culminated more than a decade later in the voluntary withdrawal of a portion of the fence. Thus, the public continued to use the beach and lagoon for recreational activities.
The current dispute traces its genesis to 1983, when respondents obtained an emergency permit from the California Coastal Commission (hereafter the CCC) to construct a rock revetment seawall to protect homes in the Seadrift subdivision from storm damage. A permanent permit for installation and maintenance of the seawall was requested from Marin County (hereafter the County), the local governmental authority for coastal development under the California Coastal Act of 1976 (Pub. Resources Code, § 30000 et seq.). The County proposed to issue the permanent permit upon the condition that respondents dedicate to the public the beach on the Seadrift Sandspit, but on the advice of counsel, the County eventually approved the permit without any dedication requirements.
The chair and vice-chair of the CCC and a Seadrift property owner appealed the County's decision to issue a permanent permit without dedication conditions or public access provisions to the CCC in 1987. Concurrently, the CCC and the Attorney General investigated the prescriptive rights of the public to recreational use of the Seadrift beach, and the extent to which the seawall interfered with those rights. The CCC concluded "that there are public prescriptive rights on the sandy beach," and professed an intent to "pursue that" on behalf of the public if necessary.
The CCC, joined by the State Lands Commission (hereafter the SLC) and the Attorney General, also asserted that the entire Bolinas Sandspit remained public domain owned by the federal government, rather than by respondents as private property. On behalf of the State of California, an administrative action was therefore instituted before the Bureau of Land Management (hereafter the BLM). On March 6, 1989, after a hearing at which respondents, their title companies, and the state agencies appeared, the BLM determined that under the doctrine of "administrative finality" the federal *1060 government had no right to pursue an ownership interest in the Bolinas Sandspit. The BLM decision was appealed by the Attorney General, the CCC and the SLC on behalf of the public to the Interior Board of Land Appeals, without success, and then by an action for judicial review filed in federal court on May 15, 1992 (hereafter the federal court action).[1] (California Coastal Com. v. United States Department of Interior (U.S.Dist.Ct. (E.D.Cal.) 1992, No. Civ. S-92-072 GEB GGH).)
Meanwhile, on April 3, 1992, a group of Seadrift property owners filed a petition for writ of mandate and complaint to quiet title in Marin County Superior Court[2] (hereafter the Kelly action), in which they asserted that the CCC lacked jurisdiction to determine or proclaim any "implied dedication or prescriptive rights over the beach-front lots in the Seadrift Subdivisions ..." on the part of the public. A subsequent order in the Kelly action stayed any further proceedings in that case or the CCC administrative appeal of the seawall permit application until 90 days after final resolution of the federal court action.
A comprehensive settlement of the two pending suits and the conflicting property rights was proposed to respondents by the CCC and the SLC in February of 1992, to resolve all public claims of ownership or use of the Bolinas Sandspit and "finally bring to an end" the dispute. Negotiations proceeded, and between December of 1993 and March of 1994, the CCC conducted settlement hearings. Appellant objected to the settlement proffered by the CCC staff as contrary to the Marin County Local Coastal Program promulgated under the authority of the Coastal Act, which designated the beach "for low-intensity recreational uses." Appellant argued that the historic public use of the Seadrift Sandspit required a recreational prescriptive easement greater in size, time of use and permitted activities than specified in the proposed agreement. Appellant suggested issuance of a permanent permit for the seawall "only if a public recreational easement" consistent with the local coastal program was imposed as a condition of approval.
On March 16, 1994, the CCC approved the proposed settlement agreement which had been revised to be consistent with the "historical use of the beach" revealed during the hearing process and the policies of the local coastal program. The parties to the settlement agreement were those named in the Kelly and federal court actions, including the Department of the Interior, acting for the United States of America, the CCC, SLC, and the *1061 California Attorney General, all acting on behalf of the State of California, the County of Marin, the Seadrift Association, the individual record owners of lots and parcels in the Seadrift subdivisions, and their title insurance companies. The expressed objective of the settlement agreement was final resolution of all existing disputes between the parties as to the "nature and extent of public right, title and interest in and to the Bolinas Sandspit" raised in the Kelly action, the federal court action, and the administrative appeal before the CCC reviewing the approval by the County of respondents' permit for installation of the seawall.
The settlement agreement required the Seadrift Association and at least 75 percent of the lot owners of the Seadrift Sandspit beachfront lots to grant easements to the public, to be recorded in the County, of a specified area for "low intensity, passive recreation uses," excluding "the period from 10:00 ... at night until one hour before sunrise." In exchange, the settlement agreement provided that the claims of public ownership and use of the Seadrift Sandspit asserted in the Kelly and federal court actions would be relinquished in accordance with stipulated judgments, the permit authorizing installation and maintenance of the seawall would be placed in escrow, all other offers of dedication of easement rights to the public would be extinguished, and the parties would agree to refrain from challenging the settlement agreement or encouraging "any third party" to do so. Further, any lot owner who failed to execute the settlement agreement or convey an easement as directed by it was "deemed to have waived and relinquished any right and entitlement to the benefits" of the agreement. Finally, the settlement agreement provided for judicial confirmation of its terms by judgment entered in the Kelly action.
On May 13, 1994, appellant filed a complaint in intervention in the Kelly action, and a separate petition for writ of mandate against the CCC in Marin County Superior Court.[3] The complaint in intervention alleged an interest in the Kelly action to "assert a public recreational easement over the Bolinas Sandspit" adverse to the plaintiffs and "different from" the CCC, which had declined "to assert a public recreational easement by implied dedication." The petition for writ of mandate directly challenged both the settlement agreement, on the ground that it improperly restricts historic public recreational use of the beach, and the approval by the CCC of the permit to construct the seawall based upon the settlement agreement, as arbitrary, capricious, unsupported by substantial evidence, and contrary to the law. The motion to intervene was denied, without prejudice to appellant's right to *1062 "establish in a separate action" that an easement exists by virtue of "implied dedication." Appellant voluntarily dismissed with prejudice the action for petition for writ of mandate on August 1, 1994.
Judgment was subsequently entered in the Kelly action in accordance with the terms of the settlement agreement. The court retained jurisdiction to "enforce the provisions of the settlement agreement," and to vacate the judgment in the event the federal court action was not resolved as specified in exhibit F of the settlement agreement. On September 27, 1994, summary judgment in the federal action was entered in favor of the defendants and interveners[4] to confirm the decision of the Interior Board of Land Appeals to deny any right, title, or interest of the United States in the Bolinas Sandspit, as contemplated by the settlement agreement.
The present complaint for implied dedication and declaratory and injunctive relief was filed by appellant[5] "on behalf of the public" against respondents on September 2, 1994. In the cause of action for implied dedication appellant alleged that "the public has acquired a recreational easement by implied dedication over the property."
Respondents moved for summary judgment on the ground that appellant's action was barred by the settlement agreement and the consequent judgments previously entered pursuant to it in the Kelly and federal court actions. The motion was denied, as were petitions for writ of mandate filed in this court seeking review of the trial court's decision.
On June 21, 1996, respondents moved for judgment on the pleadings based upon appellant's "lack of standing to represent the public." The motion was granted, but appellant was directed to file an amended pleading. Respondents' demurrer to appellant's first amended complaint was also sustained with leave to amend, and appellant then filed a second amended complaint pursuant to Code of Civil Procedure section 382[6] on behalf of its members who reside nearby and use the Bolinas Sandspit for recreational *1063 purposes. The second amended complaint alleges that as a result of continuous public use of the Bolinas Sandspit since the 1920's, "a public recreational easement has vested by implied dedication over the property entitling Coast's members to continue such use." The pleading further alleges that according to the settlement agreement of March 16, 1994, respondents have "curtailed the historic use" by the public of the Bolinas Sandspit, and permit use by the members of appellant and others of "an easement which is smaller in area, permits fewer types of use, and less time of use than the easement claimed by [appellant] on the basis of implied dedication...."
Respondents demurred to the second amended complaint, again on the ground of appellant's lack of standing to assert an easement on behalf of the public, which had "already been represented" by the CCC, the SLC and the California Attorney General in proceedings that determined the nature of "public easement rights by implied dedication" in the Bolinas Sandspit. The trial court sustained the demurrer without leave to amend, and this appeal followed.

DISCUSSION
Appellant argues that it has standing to bring an action "on behalf of its members" for implied dedication of an easement "to establish the public's rights to use of the beach," and is not precluded by the settlement agreement from doing so in this proceeding. Respondents maintain that the settlement agreement is binding upon appellant and bars the present action "for implied dedication and public prescriptive rights." Respondents also challenge appellant's standing to "claim an easement for the benefit of the public."
Our review is governed by well-settled principles. (1) "When reviewing an order sustaining a demurrer without leave to amend, this court must treat the demurrer as admitting all properly pleaded facts, but not contentions, deductions or conclusions of fact or law. We must read the complaint as a whole and give it a reasonable interpretation. [Citation.] If the complaint, liberally construed, can state a cause of action, or if it is reasonably possible that the plaintiffs can cure the complaint by amendment, the trial court should not sustain a demurrer without leave to amend." (Koch v. Rodlin Enterprises (1990) 223 Cal. App.3d 1591, 1595 [273 Cal. Rptr. 438].)

I. Respondents' Right to Raise the Issue of the Binding Effect of the Settlement Agreement.

Appellant submits that the trial court's previous denial of respondents' summary judgment motion, and this court's denial of the petitions for writ of *1064 mandate seeking review of the trial court's decision, "laid to rest" the issue of the effect of the settlement agreement upon the cause of action for implied dedication in the second amended complaint. Appellant maintains that respondents cannot resurrect and rely on the settlement agreement as a bar to maintaining the present action since that issue was finally resolved against them in the summary judgment proceedings.
(2) Although not so expressed by appellant, the argument implicates principles of the law of the case doctrine, which holds that where an appellate court states in its opinion a principle of law necessary to the decision, that principle becomes law of the case and must be adhered to in all subsequent proceedings, including appeals. (People v. Stanley (1995) 10 Cal.4th 764, 786 [42 Cal. Rptr.2d 543, 897 P.2d 481]; Clemente v. State of California (1985) 40 Cal.3d 202, 211 [219 Cal. Rptr. 445, 707 P.2d 818]; Bovard v. American Horse Enterprises, Inc. (1988) 201 Cal. App.3d 832, 841 [247 Cal. Rptr. 340].) Law of the case is a doctrine of procedure founded upon the concepts of judicial economy and finality of court rulings. (People v. Stanley, supra, at p. 786; George Arakelian Farms, Inc. v. Agricultural Labor Relations Bd. (1989) 49 Cal.3d 1279, 1291 [265 Cal. Rptr. 162, 783 P.2d 749]; Searle v. Allstate Life Ins. Co. (1985) 38 Cal.3d 425, 435 [212 Cal. Rptr. 466, 696 P.2d 1308].) "Application of the rule is now subject to the qualifications that `the point of law involved must have been necessary to the prior decision, that the matter must have been actually presented and determined by the court, and that application of the doctrine will not result in an unjust decision.' [Citations.]" (People v. Shuey (1975) 13 Cal.3d 835, 842 [120 Cal. Rptr. 83, 533 P.2d 211]; see also People v. Pacini (1981) 120 Cal. App.3d 877, 883 [174 Cal. Rptr. 820].)
It is now settled that pretrial denial of a writ petition does not establish law of the case unless the denial is accompanied by a written opinion following the issuance of an alternative writ. (Kowis v. Howard (1992) 3 Cal.4th 888, 891 [12 Cal. Rptr.2d 728, 838 P.2d 250]; Melamed v. City of Long Beach (1993) 15 Cal. App.4th 70, 75 [18 Cal. Rptr.2d 729].) Thus, our prior summary denial of respondents' writ petition has no preclusive effect upon consideration of the issue on appeal from the ruling on the demurrer. (Melamed, supra, at p. 75.)

II. The Effect of the Settlement Agreement.

We turn then to the merits of respondents' claim that the settlement agreement is binding upon appellant and forecloses relitigation of the claim of implied dedication of a public easement. Respondent's argument is based *1065 upon principles of res judicata. (3) The doctrine of res judicata rests upon the ground that the party to be affected, 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, and should not be permitted to litigate it again to the harassment and vexation of his opponent. Public policy and the interest of litigants alike require that there be an end to litigation." (Panos v. Great Western Packing Co. (1943) 21 Cal.2d 636, 637 [134 P.2d 242].) The doctrine applies when 1) the issues decided in the prior adjudication are identical with those presented in the later action; 2) there was a final judgment on the merits in the prior action; and 3) the party against whom the plea is raised was a party or was in privity with a party to the prior adjudication. (Lyons v. Security Pacific Nat. Bank (1995) 40 Cal. App.4th 1001, 1015 [48 Cal. Rptr.2d 174].) Even if these threshold requirements are established, res judicata will not be applied "if injustice would result or if the public interest requires that relitigation not be foreclosed. [Citations.]" (Consumers Lobby Against Monopolies v. Public Utilities Com. (1979) 25 Cal.3d 891, 902 [160 Cal. Rptr. 124, 603 P.2d 41].) To determine whether to sustain a demurrer on res judicata grounds, judicial notice may be taken of a prior judgment and other court records. (Kirkpatrick v. City of Oceanside (1991) 232 Cal. App.3d 267, 281 [283 Cal. Rptr. 191]; Carroll v. Puritan Leasing Co. (1978) 77 Cal. App.3d 481, 486 [143 Cal. Rptr. 772].)

A. Final Decision on the Merits.

(4) The settlement agreement, as incorporated into the judgments in the Kelly and federal court actions, meets the first requirement of res judicata that there was a final decision on the merits, which "`"... includes any prior adjudication of an issue in another action that is determined to be sufficiently firm to be accorded conclusive effect."' (Sandoval v. Superior Court (1983) 140 Cal. App.3d 932, 936 [190 Cal. Rptr. 29], quoting Rest.2d Judgments, § 13, italics added by Sandoval court.)" (Western Mutual Ins. Co. v. Yamamoto (1994) 29 Cal. App.4th 1474, 1482-1483 [35 Cal. Rptr.2d 698].) "[A] stipulated judgment may properly be given collateral estoppel effect, at least when the parties manifest an intent to be collaterally bound by its terms." (California State Auto. Assn. Inter-Ins. Bureau v. Superior Court (1990) 50 Cal.3d 658, 664 [268 Cal. Rptr. 284, 788 P.2d 1156]; see also McLaughlin v. National Union Fire Ins. Co. (1994) 23 Cal. App.4th 1132, 1152 [29 Cal. Rptr.2d 559]; Gates v. Superior Court (1986) 178 Cal. App.3d 301, 311 [223 Cal. Rptr. 678].) "`A judgment entered ... by consent or stipulation, is as conclusive a ... bar as a judgment rendered after trial.' (4 Witkin, Cal. Procedure (2d ed. 1971) Judgment, § 170, p. 3312; De Weese v. *1066 Unick [(1980)] 102 Cal. App.3d [100,] 105 [162 Cal. Rptr. 259].)" (Johnson v. American Airlines, Inc. (1984) 157 Cal. App.3d 427, 431 [203 Cal. Rptr. 638].)
We think the intent of the parties to be bound by the settlement agreement is clearly manifested by provisions which conclusively resolved the administrative appeal before the CCC, the Kelly action and the federal court action, upon approval and entry of stipulated judgments incorporating its provisions. Pursuant to paragraph 10 of the settlement agreement, the parties were restrained from seeking in any manner or future proceeding to impose different conditions or requirements on the public prescriptive easement to the Seadrift Sandspit.[7] To further encourage compliance with the stipulated settlement, Seadrift property owners who failed to convey the required easements to the public were denied the beneficial preclusive force of the agreement. Without renouncing prospective actions to pursue any individual rights associated with use of the Bolinas Sandspit, the intended effect of the settlement agreement was to decisively establish the nature and extent of public use of the property, thereby to prevent any future disputes over the creation of "a public prescriptive easement or implied dedication."
We are not persuaded that lack of finality of the settlement agreement is indicated by the trial court's reference in the order denying the motion to intervene in the Kelly action to appellant's retention of rights "to seek to establish in a separate action" that an easement exists. Approval of the settlement agreement by the parties and denial of the motion to intervene were separate proceedings. The finality of the judgments entered upon the *1067 settlement agreement must be assessed independently, rather than on the basis of pronouncements made in other orders.[8] We do not think the comments of the trial court when resolving appellant's request to intervene may contravene the obvious intent manifested by the parties to the settlement agreement that it serve as final adjudication of the public easement rights to the Bolinas Sandspit.
Although the judgments entered in the Kelly and federal court actions in accordance with the settlement agreement were rendered through consent and stipulation, they qualify as final and on the merits for purposes of the res judicata doctrine. (California State Auto. Assn. Inter-Ins. Bureau v. Superior Court, supra, 50 Cal.3d at p. 664; Victa v. Merle Norman Cosmetics, Inc. (1993) 19 Cal. App.4th 454, 460-461 [24 Cal. Rptr.2d 117].)

B. Identity of Issues.

We turn to an examination of the identity of issues requirement. (5) Unless the issue or cause of action in the two actions is identical, the first judgment does not stand as a bar to the second suit. (Agarwal v. Johnson (1979) 25 Cal.3d 932, 954 [160 Cal. Rptr. 141, 603 P.2d 58]; Vary v. Forrest (1988) 201 Cal. App.3d 1506, 1511 [247 Cal. Rptr. 873]; Winn v. Board of Pension Commissioners (1983) 149 Cal. App.3d 532, 537 [197 Cal. Rptr. 111].) To define a cause of action, California follows the primary right theory, which conceives of a cause of action as "`1) a primary right possessed by the plaintiff, 2) a corresponding primary duty devolving upon the defendant, and 3) a delict or wrong done by the defendant which consists in a breach of such primary right and duty. [Citation.] Thus, two actions constitute a single cause of action if they both affect the same primary right.... [Citation.]' [Citation.]" (Acuna v. Regents of University of California (1997) 56 Cal. App.4th 639, 648 [65 Cal. Rptr.2d 388].) "[T]here is only a single cause of action for the invasion of one primary right," even if multiple theories of recovery are asserted. (Agarwal v. Johnson, supra, at p. 954; see also Zimmerman v. Stotter (1984) 160 Cal. App.3d 1067, 1073 [207 Cal. Rptr. 108].) We must compare the two actions, looking at the rights which are sought to be vindicated and the harm for which redress is claimed. (Zimmerman v. Stotter, supra, at p. 1073; City of Los Angeles v. Superior Court (1978) 85 Cal. App.3d 143, 153 [149 Cal. Rptr. 320].) "Reference must be made to the pleadings and proof in each case. [Citation.]" (Wimsatt v. Beverly Hills Weight etc. Internat., Inc. (1995) 32 Cal. App.4th 1511, 1517 [38 Cal. Rptr.2d 612].)
*1068 (6) The record before us demonstrates that appellant's cause of action for implied dedication stated in the second amended complaint is in all respects identical to the issues resolved in the settlement agreement. The essential and explicit purpose of the settlement agreement was to "resolve the disputes between the parties about the nature and extent of public right, title and interest in and to the Bolinas Sandspit...." The Seadrift property owners were required to grant described recreational easements to the public; in return, all claims of public title, ownership and interest to the Bolinas Sandspit asserted in the Kelly and federal court actions were extinguished. The Kelly action had presented the precise issue of the nature and extent of any public easement by implied dedication or prescriptive rights.[9] The express easement granted to the public pursuant to the settlement agreement replaced the disputed prescriptive easement in Kelly.
The case of City of Long Beach v. Daugherty (1977) 75 Cal. App.3d 972, 976-977 [142 Cal. Rptr. 593], relied upon by appellant to claim lack of identity of issues, involved a prior agreement between a city and property owners that "settled the boundaries of the land in question" and the title to it. The agreement was not given res judicata effect in a subsequent action involving a claim of public easement over the property since the prior agreement did not address any issue of easements. The settlement agreement and accompanying judgments in the instant case specifically adjudicated the public easement issue.
In the action before us, appellant alleges that the easement granted to the public by the settlement agreement and judgments is impermissibly more restricted than the "public recreational easement ... vested by implied dedication" through continuous use of the Bolinas Sandspit by appellant's members "and others." Whereas appellant purports to represent its members as a "California nonprofit public benefit corporation," the action seeks to create a "public recreational easement" by "implied dedication," not any distinctive individual rights or interests in the property. Nothing in the second amended complaint differentiates the primary rights pursued by appellant in this proceeding from those determined by the judgments entered pursuant to the settlement agreement.
The prior and current actions differ only in the procedural context in which they have arisen, not the substantive issues presented. In Kelly, the Seadrift property owners sued to prevent any declaration of public prescriptive rights  as was contemplated by the County and the CCC as a condition of the seawall permit  while appellant has sued to obtain a "public recreational easement." However, the application of the doctrine of res judicata *1069 "depends on whether the issue in both actions is the same, not whether the issue arises in the same context." (First N.B.S. Corp. v. Gabrielsen (1986) 179 Cal. App.3d 1189, 1195-1196 [225 Cal. Rptr. 254].) The second amended complaint specifically alleges that: "The issue of recreational use of the Bolinas Sandspit is common to all members [of Coast] who assert no other issues of law and claim no other individual property interests in the Bolinas Sandspit." At the hearing on the demurrer, appellant's counsel agreed with the trial court that no allegation of acquisition of "private prescriptive rights" had been made. Appellant has not pursued individual claims, applicable only to its members in some way distinctive from the property rights of the public adjudicated in the Kelly and federal actions, as necessary to avoid the preclusive effect of res judicata. (Cf. Kirkpatrick v. City of Oceanside, supra, 232 Cal. App.3d at pp. 281-282; Oro Fino Gold Mining Corp. v. County of El Dorado (1990) 225 Cal. App.3d 872, 879-880 [274 Cal. Rptr. 720].) We conclude that the element of identity of issues has been established. (Towards Responsibility in Planning v. City Council (1988) 200 Cal. App.3d 671, 686 [246 Cal. Rptr. 317].)

C. Identity of Parties.

(7a) Appellant complains that it did not participate in the settlement agreement or the prior actions, so the requisite identity of parties is absent. Appellant maintains that as a nonprofit "public interest" group it had standing to bring an action for implied dedication of a public recreational easement despite the previous settlement consummated by respondents and the CCC, the SLC, and the Attorney General. Appellant's position is that government agencies cannot, by entering into a settlement of a dispute over public use of coastal areas, usurp the right and standing of public interest groups to litigate "public access by way of implied dedication."
Although not a party to the settlement agreement, appellant may be bound by its terms if we determine that privity with the parties to the Kelly and federal court actions existed. (See Armstrong v. Armstrong (1976) 15 Cal.3d 942, 951 [126 Cal. Rptr. 805, 544 P.2d 941].) (8) The concept of privity for the purposes of res judicata or collateral estoppel refers "to a mutual or successive relationship to the same rights of property, or to such an identification in interest of one person with another as to represent the same legal rights (Zaragosa v. Craven (1949) 33 Cal.2d 315 [202 P.2d 73, 6 A.L.R.2d 461]; Teitelbaum Furs, Inc. v. Dominion Ins. Co., Ltd. [1962] 58 Cal.2d [601,] 604 [25 Cal. Rptr. 559, 375 P.2d 439]; Rynsburger v. Dairymen's Fertilizer Coop., Inc. (1968) 266 Cal. App.2d 269 [72 Cal. Rptr. 102]) and, more recently, to a relationship between the party to be estopped and the *1070 unsuccessful party in the prior litigation which is `sufficiently close' so as to justify application of the doctrine of collateral estoppel. [Citations.]" (Clemmer v. Hartford Insurance Co. (1978) 22 Cal.3d 865, 875 [151 Cal. Rptr. 285, 587 P.2d 1098]; see also Brown v. Rahman (1991) 231 Cal. App.3d 1458, 1461-1462 [282 Cal. Rptr. 815]; Ceresino v. Fire Ins. Exchange (1989) 215 Cal. App.3d 814, 820 [264 Cal. Rptr. 30]; Dyson v. State Personnel Bd. (1989) 213 Cal. App.3d 711, 723 [262 Cal. Rptr. 112].) "`This requirement of identity of parties or privity is a requirement of due process of law.' (Clemmer v. Hartford Insurance Co. (1978) 22 Cal.3d 865, 874 [151 Cal. Rptr. 285, 587 P.2d 1098].) `Due process requires that the nonparty have had an identity or community of interest with, and adequate representation by, the ... party in the first action. [Citations.] The circumstances must also have been such that the nonparty should reasonably have expected to be bound by the prior adjudication....'" (Victa v. Merle Norman Cosmetics, Inc., supra, 19 Cal. App.4th at p. 464; see also National Union Fire Ins. Co. v. Lynette C. (1994) 27 Cal. App.4th 1434, 1452 [33 Cal. Rptr.2d 496]; St. Sava Mission Corp. v. Serbian Eastern Orthodox Diocese (1990) 223 Cal. App.3d 1354, 1376 [273 Cal. Rptr. 340].)
Our Supreme Court has recognized that: "Privity is not susceptible of a neat definition, and determination of whether it exists is not a cut-and-dried exercise. (Clemmer v. Hartford Insurance Co. (1978) 22 Cal.3d 865, 875 [151 Cal. Rptr. 285, 587 P.2d 1098]; Lynch v. Glass (1975) 44 Cal. App.3d 943, 947 [119 Cal. Rptr. 139].)" (Aronow v. LaCroix (1990) 219 Cal. App.3d 1039, 1048 [268 Cal. Rptr. 866]; Miller v. Superior Court (1985) 168 Cal. App.3d 376, 383 [214 Cal. Rptr. 125].) In the final analysis, the determination of privity depends upon the fairness of binding appellant with the result obtained in earlier proceedings in which it did not participate. (Miller v. Superior Court, supra, at p. 384-385.) "`Whether someone is in privity with the actual parties requires close examination of the circumstances of each case.' (People v. Henderson (1990) 225 Cal. App.3d 1129, 1151 [275 Cal. Rptr. 837].)" (Victa v. Merle Norman Cosmetics, Inc., supra, 19 Cal. App.4th at p. 464.) The issue of privity before us is a legal one, presented on undisputed facts, so we undertake a de novo review of the trial court's decision. (Ibid.)
(7b) We are persuaded that appellant, along with the public as a whole, was adequately represented by the state agencies vested with authority to litigate the issue of public access to the Bolinas Sandspit. (9) A party is adequately represented for purposes of the privity rule "if his or her interests are so similar to a party's interest that the latter was the former's virtual representative in the earlier action. (United States v. Geophysical Corp. (9th Cir.1984) 732 F.2d 693, 697.)" (Helfand v. National Union Fire Ins. Co. *1071 (1992) 10 Cal. App.4th 869, 902 [13 Cal. Rptr.2d 295].) We measure the adequacy of "representation by inference, examining whether the ... party in the suit which is asserted to have a preclusive effect had the same interest as the party to be precluded, and whether that ... party had a strong motive to assert that interest. If the interests of the parties in question are likely to have been divergent, one does not infer adequate representation and there is no privity. ([Clemmer v. Hartford Insurance Co. (1978) 22 Cal.3d 865 [151 Cal. Rptr. 285, 587 P.2d 1098],] at p. 877; Courtney v. Waring (1987) 191 Cal. App.3d 1434, 1445-1446 [237 Cal. Rptr. 233].) If the ... party's motive for asserting a common interest is relatively weak, one does not infer adequate representation and there is no privity. (Leader v. State of California (1986) 182 Cal. App.3d 1079, 1087 [226 Cal. Rptr. 207].)" (Aronow v. LaCroix, supra, 219 Cal. App.3d at p. 1049.)
(7c) Appellant does not dispute that pursuant to statutory authority, the CCC, the SLC and the Attorney General were the state agencies responsible for representation of the public interest in the disputes over access to the Bolinas Sandspit. (Gov. Code, §§ 12512, 12518; Pub. Resources Code, §§ 6101-6102, 6107, 6201, 6210.9, 6301, 30330, 30334, 30416; Pierce v. Superior Court (1934) 1 Cal.2d 759, 761-762 [37 P.2d 460, 96 A.L.R. 1020]; People ex rel. State Lands Com. v. City of Long Beach (1962) 200 Cal. App.2d 609, 624-625 [19 Cal. Rptr. 585].)[10] (10) "`The Attorney General, ... is the chief law officer of the state (Cal. Const., art. V, § 13). As such he possesses not only extensive statutory powers but also broad powers derived from the common law relative to the protection of the public interest. [Citations.] "[H]e represents the interest of the people in a matter of public concern." [Citation.] Thus, "in the absence of any legislative restriction, [he] has the power to file any civil action or proceeding directly involving the rights and interests of the state, or which he deems necessary for the enforcement of the laws of the state, the preservation of order, and the protection of public rights and interest." [Citation.] Conversely, he has the duty to defend all cases in which the state or one of its officers is a party. *1072 (Gov. Code, § 12512.)' (D'Amico v. Board of Medical Examiners (1974) 11 Cal.3d 1, 14-15 [112 Cal. Rptr. 786, 520 P.2d 10]; Kilgore v. Younger (1982) 30 Cal.3d 770, 784-785 [180 Cal. Rptr. 657, 640 P.2d 793]; State Board of Pharmacy v. Superior Court (1978) 78 Cal. App.3d 641, 644-645 [144 Cal. Rptr. 320].)" (California Air Resources Bd. v. Hart (1993) 21 Cal. App.4th 289, 295 [26 Cal. Rptr.2d 153]; see also People v. New Penn Mines, Inc. (1963) 212 Cal. App.2d 667, 671 [28 Cal. Rptr. 337].)
(7d) The record further shows that in the Kelly and federal court actions the participating state agencies zealously pursued the rights of the public to use the Bolinas Sandspit. When respondents applied for a permit to construct the seawall, the County and the CCC proposed to issue the permit only upon the condition of dedication of a public access easement. After an investigation, the CCC and the Attorney General not only claimed "public prescriptive rights on the sandy beach," but through administrative channels also challenged respondents' title to the property. The settlement agreement specifically delineated the right of citizens of the state, including those counted as members of appellant, to use the property. Thus, the state agencies asserted the same interests in the property as appellant, and, upon our review of the record, seem to have been equally motivated to reach a successful conclusion of the litigation on behalf of the public.
That the prior litigation ended in a settlement rather than a successful judgment after trial does not diminish the worthiness of the effort. (See Helfand v. National Union Fire Ins. Co., supra, 10 Cal. App.4th at pp. 902-903.) The settlement agreement was the product of a reasonable compromise, and does not carry with it even the hint of any abdication of the role of public agent by the parties to the prior litigation. To the contrary, the CCC, SLC, the County, and Attorney General engaged in a lengthy, vigorous conflict with respondents to obtain public access rights, and in the end obtained a result that appears quite favorable to the public. Thus, the state agencies not only acted on behalf of the public, including appellant's members, but the representation provided was in all respects effective. (Alaska Sport Fishing Ass'n v. Exxon Corp. (9th Cir.1994) 34 F.3d 769, 773; Lewis v. County of Sacramento (1990) 218 Cal. App.3d 214, 218-219 [266 Cal. Rptr. 678]; Gates v. Superior Court, supra, 178 Cal. App.3d at pp. 307-308.) "`[W]hen a party acts in a representative capacity, and as such is lawfully authorized to litigate the questions at issue for those whom he represents, they as well as he are bound by the judgment. [Citation.]' (Murdock v. Eddy (1940) 38 Cal. App.2d 551, 554 [101 P.2d 722].)" (Estate of Baumann (1988) 201 Cal. App.3d 927, 935 [247 Cal. Rptr. 532].)
Nor, we conclude, is the res judicata effect of the settlement agreement negated by appellant's failure to control or directly participate in the Kelly *1073 and federal court actions, or even by the denial of the motion to intervene.[11] (See Lewis v. County of Sacramento, supra, 218 Cal. App.3d at pp. 218-219; Johnson v. American Airlines, Inc., supra, 157 Cal. App.3d at p. 431.) We do not find any indication in the record of a direct interest of appellant in the current dispute that was unrepresented by the state agencies in the prior litigation. The members of appellant were also members, although unnamed, of the class of public citizens adequately represented by the state agencies in the Kelly and federal court actions. Appellant, even if not named or active as a party, would be bound by judgments in the same prior actions brought pursuant to statutory authority by a different citizens group acting in a representative capacity for the benefit of the public, or at least those members of it similarly situated, to determine the same matter of public interest. (See Gates v. Superior Court, supra, 178 Cal. App.3d at pp. 307-308; Smith v. City of Los Angeles (1961) 190 Cal. App.2d 112, 128 [11 Cal. Rptr. 898].) The result is no different because the government represented the interests of the public as a class in the prior actions. (11) Where, as here, authority to pursue public rights or interests in litigation has been given to a public entity by statute, a judgment rendered is res judicata as to all members of the class represented. (Trujillo v. County of Santa Clara (9th Cir.1985) 775 F.2d 1359, 1367; Water District v. Stevens (1929) 206 Cal. 400, 410-411 [274 P. 538]; Price v. Sixth District Agricultural Assn. (1927) 201 Cal. 502, 510, 513-514 [258 P. 387]; County of Tulare v. Boggs (1983) 146 Cal. App.3d 236, 242 [194 Cal. Rptr. 80]; Lynch v. Glass (1975) 44 Cal. App.3d 943, 949 [119 Cal. Rptr. 139]; Rynsburger v. Dairymen's Fertilizer Coop., Inc. (1968) 266 Cal. App.2d 269, 277-278 [72 Cal. Rptr. 102].)[12]
(7e) We acknowledge that when the motion to intervene was contested the parties and even the trial court mentioned appellant's retention of rights to pursue an easement by implied dedication in a separate action. The Marin County Board of Supervisors, in approving the settlement, also discussed the rights of "any person or entity" to seek greater access to the beach than was afforded by the settlement agreement. Nevertheless, we find that the zealous consideration and pursuit of the right of the public to access to the Bolinas Sandspit provided by other parties in the actions associated with the settlement agreement bind appellant to the result as if it had actually appeared and *1074 adjudicated the matter. The rights reserved to appellant extend only to any individual or separate property rights claimed by the group or its members that were not resolved by the settlement agreement.
In the prior actions, the CCC, SLC and the Attorney General acted in a representative capacity for the public, including the members of appellant, to promote interests identical to those at issue here. We do not suggest that a citizens group such as appellant would never have standing to bring a representative or class suit to establish public prescriptive rights, particularly if the state agencies entrusted with authority to act in the public interest failed to do so. But, the rights of public access to the Bolinas Sandspit were thoroughly represented by the designated state agencies as parties to the settlement agreement, and in the action for implied dedication of a public easement now before us appellant does not claim any individual private property rights separate and apart from those already adjudicated. Under the doctrine of res judicata, appellant must be considered in privity with the parties to the settlement agreement, and accordingly has no independent standing to bring a repetitive suit to litigate matters previously determined in actions pursued for the public benefit by state agencies acting in a representative capacity. (Alaska Sport Fishing Ass'n v. Exxon Corp., supra, 34 F.3d at p. 773; Lewis v. County of Sacramento, supra, 218 Cal. App.3d at pp. 218-219; Gates v. Superior Court, supra, 178 Cal. App.3d at p. 308; County of Tulare v. Boggs, supra, 146 Cal. App.3d at p. 242.)

D. Policy Considerations.

Finally, we discern no public policy reason for refusing to invoke the doctrine of res judicata. Precluding the present suit by appellant will not result in any manifest injustice to appellant or adverse impact upon the public. In granting res judicata effect to preclude suit by appellant, we do not cavalierly disregard the compelled absence of appellant from the Kelly action by the trial court's denial of the motion to intervene. We are convinced, however, based upon the particular and rather unique circumstances presented to us, that the claims asserted by appellant in the present case were commendably advanced during negotiation and ratification of the settlement agreement. Appellant's current complaint with the nature and extent of the easement granted to the public by the settlement agreement does not, in our view, compromise the ardent advocacy of the public interest previously afforded by the state agencies. Only because we find that the right of public access to the Bolinas Sandspit was considered, litigated and thoroughly protected do we accord binding effect to the settlement agreement in this proceeding despite appellant's lack of direct participation in the prior actions. Further, appellant and its members remain free, as we have indicated, *1075 to bring an action which is limited to the assertion of independent implied easement rights of its members separate and apart from the nature and extent of public access determined by the settlement agreement.
In fact, two fundamental policy considerations  promotion of judicial economy and protection of litigants from unnecessary litigation  are furthered by imposing res judicata as a bar to appellant's present action. (Zapata v. Department of Motor Vehicles, supra, 2 Cal. App.4th at p. 115; Miller v. Superior Court, supra, 168 Cal. App.3d at pp. 385-386.) If we were to rule otherwise, parties who, following lengthy litigation enter into reasonable, legitimate and ostensibly comprehensive settlements of disputes over public access to private property, would still potentially be subject to a series of additional suits by disaffected members of the public. (Acuna v. Regents of University of California, supra, 56 Cal. App.4th at p. 652.) Public policy and the interest of the participating parties require that the issue of public access to the Bolinas Sandspit reaches closure.
Upon review of the allegations of the second amended complaint and the court documents included in the record before us, we conclude that appellant's action is barred by the doctrine of res judicata. Appellant having already amended the pleading without curing the defects in it, we further conclude that the trial court did not err by sustaining the demurrer without leave to amend and dismissing the action.[13] (Otworth v. Southern Pac. Transportation Co. (1985) 166 Cal. App.3d 452, 457 [212 Cal. Rptr. 743]; Gonzales v. State of California (1977) 68 Cal. App.3d 621, 635 [137 Cal. Rptr. 681].)

DISPOSITION
Accordingly, the judgment is affirmed. Costs on appeal are awarded to respondents.
Strankman, P.J., and Dossee, J., concurred.
A petition for a rehearing was denied February 11, 1998, and appellant's petition for review by the Supreme Court was denied March 25, 1998. Kennard, J., was of the opinion that the petition should be granted.
NOTES
[1]  The Attorney General declined to represent the CCC in the federal court action.
[2]  Kelly v. California Coastal Com. (Super. Ct. Marin County, 1992, No. 152988).
[3]  Respondent Seadrift Association was named the real party in interest in the petition for writ of mandate.
[4]  Seadrift Association and First American Title Insurance Company were interveners in the federal court action.
[5]  A second plaintiff, Surfers' Coastal Environmental Coalition (hereafter SCEC), was also named in the complaint. Judgment was entered against SCEC on September 12, 1996, upon respondents' motion for judgment on the pleadings. SCEC is not a party to this appeal.
[6]  Section 382 of the Code of Civil Procedure provides in pertinent part that "when the question is one of a common or general interest, of many persons, or when the parties are numerous, and it is impracticable to bring them all before the court, one or more may sue or defend for the benefit of all." According to the second amended complaint, the members of COAST (Citizens for Open Access to Sand and Tide, Inc.), approximately 300 in number, "are so numerous that it would be impractical to bring them all before the court."
[7]  In pertinent part, paragraph 10 reads: "The parties agree that none of the parties shall in any manner challenge this Agreement [or] file or make, or assist or encourage any third party to file or make, any claim or demand in any proceeding, before any public or private entity or agency, including, but not limited to, any court of law or equity, seeking to: impose any condition or requirement that would allow pedestrian, equestrian or vehicular use by members of the public over the internal roads of the Seadrift Sandspit, except in cases of emergencies; provide access by members of the public to any part of the Seadrift Lagoon, or to those portions of the Seadrift Sandspit comprised, as of the effective date hereof, of filled lands, or (other than as specifically provided in this Agreement) to any other part of the Seadrift Sandspit located above the mean high tide line; authorize any increase or change from those agreed to in this Agreement in the permitted uses by the public on the Seadrift Sandspit Beach; or establish that a public prescriptive easement or implied dedication has ever been created or established through adverse possession, adverse use, or otherwise, over all or any portion of the Seadrift Sandspit. So long as the Seadrift subdivisions continue to be substantially used for residential purposes in the form of single family residences, so that the kind and intensity of uses are not substantially changed, the CCC, SLC and the County of Marin agree that none of them will impose in any permit for improvements to the Seadrift Sandspit any condition which requires greater public access to the Seadrift Sandspit than required by this Agreement." (Fn. omitted.)
[8]  We note that no rights were expressly reserved to appellant during the proceedings associated with approval of the settlement agreement to bring a subsequent action to establish or enforce public easement rights.
[9]  In fact, appellant unsuccessfully attempted to intervene in the Kelly action "to assert a public recreational easement by implied dedication."
[10]  Government Code section 12518 provides: "Whenever any action is brought against the State or any State agency involving the title, or right to possession or the boundaries of any lands belonging to the State or in which it has any interest, the Attorney General may, when in his judgment the public interest so requires, upon his own motion or upon the request of any State agency, appear as attorney in defense of the State or State agency. [¶] Upon his own motion or upon the request of any State agency, the Attorney General may institute such an action in the name of the people of the State or on behalf of any State agency."

Public Resources Code section 30334 states of the CCC: "The commission may do the following: [¶] (a) Contract for any private professional or governmental services, if the work or services cannot be satisfactorily performed by its employees. [¶] (b) Sue and be sued. The Attorney General shall represent the commission in any litigation or proceeding before any court, board, or agency of the state or federal government."
[11]  We of course express no opinion on the propriety of the denial of the motion to intervene in the Kelly action, as appellant did not seek review of that ruling.
[12]  The same rule holds where one governmental agency represents the interests of the State of California in prior litigation, and another subsequently seeks to pursue the same issue. "`[T]he agents of the same government are in privity with each other, since they represent not their own rights but the right of the government. [Fn. omitted.]' [Citations.]" (People v. Sims (1982) 32 Cal.3d 468, 487 [186 Cal. Rptr. 77, 651 P.2d 321]; see also Zapata v. Department of Motor Vehicles (1991) 2 Cal. App.4th 108, 114 [2 Cal. Rptr.2d 855]; Miller v. Superior Court, supra, 168 Cal. App.3d at p. 385.)
[13]  We note that appellant does not assert on appeal that the trial court abused its discretion in sustaining the demurrer without leave to amend, and there is nothing in the record indicating that appellant requested leave to amend. To the contrary, appellant's counsel represented to the trial court that no allegation of private prescriptive rights was contemplated.
