
551 P.2d 1291 (1976)
J.C. COLHOUER, Dba Colhouer Construction Company, Appellant,
v.
UNION PACIFIC RAILROAD COMPANY, a Utah Corporation, and Union Pacific Land Resources Corporation, a Utah Corporation, Respondents.
Supreme Court of Oregon, In Banc.
Argued and Submitted June 8, 1976.
Decided July 15, 1976.
Ferris F. Boothe, Portland, argued the cause for appellant. With him on the briefs were Douglas G. Beckman, and Black, Kendall, Tremaine, Boothe & Higgins, Portland.
*1292 Frank H. Lagesen, Portland, argued the cause for respondent Union Pacific Land Resources Corp. With him on the brief were Cosgrave & Kester, Portland.
McALLISTER, Justice.
The plaintiff J.C. Colhouer brought this suit in equity to foreclose a mechanic's lien against the defendant Union Pacific (U.P.) and against other former lien claimants, Krieg and Cascade. The complaint as against Krieg and Cascade was dismissed at or before the time of trial.
Union Pacific asserted as a defense that Colhouer was barred by the doctrine of res judicata from bringing this action.
After trial, the court entered judgment dismissing Colhouer's complaint inter alia on the ground of res judicata.
The sole issue is whether Colhouer is barred by res judicata from bringing this suit because he could have brought a crossclaim against Union Pacific to foreclose said lien in a prior suit.
On May 17, 1971 U.P. contracted with Colhouer to demolish the buildings on a city block in downtown Portland owned by U.P. and to construct a parking facility thereon. Colhouer, in turn, on June 21, 1971 entered into a subcontract with Krieg providing that Colhouer was to wreck and remove the buildings and Krieg was to construct the parking lot. Krieg contracted with Cascade to do the cement work. Krieg v. Union Pacific Land Res. Corp., 269 Or. 221, 525 P.2d 48 (1974) was a suit brought by Krieg on December 10, 1971 to foreclose his lien in which he named as parties defendant U.P., Colhouer and Cascade.
The primary question which gives rise to both the earlier litigation and this suit was whether certain paving in the streets surrounding Block 216 was included in the Colhouer-U.P. contract or was extra work to be paid for by U.P.
This court found in the Krieg case that the paving work in the streets was "extra work" for which Colhouer was entitled to payment from U.P. in addition to the contract price.
While the Krieg case was pending Colhouer brought this separate suit to foreclose his lien for the cost of the extra paving, plus attorney fees and costs. After the judgment and decree was entered in the Krieg case the amount prayed for in this suit for the paving work was paid by U.P. to Colhouer in satisfaction of the judgment in the prior case. This left in contention between the parties only Colhouer's claim for attorney fees and costs.
U.P. contends, and the trial court found, that Colhouer could have asserted his claims in the previous litigation and so is barred by the doctrine of res judicata. Colhouer, on the other hand, contends that Oregon's permissive crossclaim statute, ORS 16.315, allowed him to either file his claims against U.P. et al in the earlier action or to file a subsequent and separate claim of his own. Colhouer chose to bring a subsequent suit and contends he is not barred from doing so.
Krieg had filed his mechanic's lien against U.P. on November 3, 1971 and Colhouer filed his lien on December 3, 1971. Krieg brought suit to foreclose the lien on December 10, 1971 and Krieg joined Colhouer and the others as necessary parties, under ORS 87.060(6).[1] Colhouer brought his separate suit to foreclose on April 7, 1972.
From this recitation of the facts, it is clear that the same parties and the same issue, the extra paving costs, are before the court in the present case as in the previous one. It is evident that the plaintiff Colhouer could have prayed by way of crossclaim in the first action for the relief for which recovery is now sought. This is an appropriate instance for the application of the doctrine of res judicata. There *1293 is no logical reason to make a distinction in this case because Colhouer was a co-defendant with U.P. in the first suit. It is the cause of suit itself and not the form in which the subsequent suit is brought that determines whether the doctrine of res judicata applies. The doctrine always applies where the parties are the same and the subsequent suit or action is based on the same claim or demand. Stone v. Beneficial Standard Life Ins. Co., 273 Or. 594, 542 P.2d 892, 894 (1975). The claim for compensation for the extra paving was extinguished by the decree entered in Krieg and the satisfaction thereof.
Colhouer contends that the permissive language of ORS 16.315 must be interpreted to mean that he did not have to assert a crossclaim in the first action. He relies on Buck v. Mueller, 221 Or. 271, 351 P.2d 61 (1960), wherein this court held that since there is no compulsory counterclaim statute a second action is not barred by res judicata merely because the party could have asserted the claim in the first action. Buck, however, was carefully distinguished by Gwynn v. Wilhelm, 226 Or. 606, 360 P.2d 312 (1961), wherein this court stated:
"* * * It is true, as held in Buck, that in the absence of a compulsory counterclaim statute, the defendant is not required to set up a counterclaim and his failure to do so does not preclude him from bringing a separate action against the plaintiff on the separate cause of action which was available to him as a counterclaim. This rule, however, is subject to the qualification that a party can not recover in a separate action on a cause of action which he failed to plead in a prior action by way of setoff or counterclaim but which was necessarily adjudicated by the former judgment. * * *" 226 Or. at 610, 360 P.2d at 314. (Emphasis added.)
The qualification as stated in Gwynn v. Wilhelm, supra, applies equally to crossclaims, and applies in this suit. The liability of U.P. to Colhouer for the cost of the extra paving was not only "necessarily adjudicated," but was actually determined in the first action.
This case aptly demonstrates the reason for the development of the doctrine of res judicata. As this court explained in Dean v. Exotic Veneers, Inc., 271 Or. 188, 192, 531 P.2d 266, 268 (1975):
"The principal purposes of res judicata are prevention of harassment of defendants by successive legal proceedings as well as economy of judicial resources. Its scope is related to the limits upon the various forms of relief which may be requested in one proceeding and the limitations upon amendments to pleadings during trial. As permissible joinder of requests for various forms of relief and amendments during trial become broader and more liberal, the reasons behind res judicata dictate that parties to actions be required to make use of such liberal procedures and not be permitted to protract litigation through a multiplicity of suits or actions which can be disposed of in one proceeding. * * *"
Colhouer acknowledges the duplicity of the prior action and the present one and concedes that sound public policy would support requiring parties involved in mechanic's liens to crossclaim or find their lien extinguished by a prior judgment. Colhouer urges this court, however, to apply any such holding only prospectively as was done in Dean, supra.
The present case differs from Dean. In Dean's fact situation, this court decided to apply the doctrine of res judicata only prospectively because in finding that res judicata would normally apply, the court overruled an earlier Oregon case which the plaintiff in Dean might reasonably have relied on in choosing to bring the subsequent action. The result reached in the present case does not require overruling any earlier Oregon authority. To the *1294 contrary, it affirms the long standing interpretation of res judicata in this state. As this court cogently stated in 1900:
"* * * The law affords to parties litigant their day in court for the enforcement of their rights or the redress of their injuries, but public policy, in the interest of the peace of society, demands that litigation should not be interminable, and, in enforcing such demand, the law limits parties to one day in court, thereby requiring them to bring forward all claims and demands properly belonging to the cause of suit or defense, as well as their evidence in support of their respective theories; and, as a corollary of this principle, courts usually hold that judgments and decrees are conclusive, not only as to what was actually tried, but also as to whatever might have been litigated: 2 Black, Judgm. § 731.
"A party failing to assert a claim in a suit in equity, in which it might have been litigated with propriety, will not be permitted afterwards to enforce it in a second suit, unless his failure to do so in the first instance was caused by the fraud of his adversary, and was not attributable to his own negligence:
* * *." Belle v. Brown, 37 Or. 588, 592-593, 61 P. 1024, 1026 (1900).
Similar reasoning is applied in an analogous case, Call v. Jeremiah, 246 Or. 568, 425 P.2d 502 (1967).
The prior judgment and decree extinguished Colhouer's claim. The opportunity to litigate the attorneys' fees and costs was present in the first suit when the subject of Colhouer's mechanic's lien against U.P. was adjudicated and determined in Colhouer's favor. Colhouer could have brought a crossclaim in that action for the relief for which he now prays. It is evident that the present action is based on the same operative facts as the first action and is, therefore, barred by the doctrine of res judicata.
The decree of the trial court is affirmed.
NOTES
[1]  Oregon Laws 1975, Chapter 466, § 16.
