
347 A.2d 623 (1975)
AIR-LITE PRODUCTS, INC.,
v.
GILBANE BUILDING COMPANY et al.
Elizabeth D. HOLMES et al.
v.
GILBANE BUILDING COMPANY et al.
No. 74-111-Appeal.
Supreme Court of Rhode Island.
November 17, 1975.
*624 Gunning, LaFazia, Gnys & Selya, J. Renn Olenn, Providence, for Air-Lite Products, Inc.
Tillinghast, Collins & Graham, Edward J. Regan, Providence, for Elizabeth D. Holmes and others.
Higgins & Slattery, Robert J. Dumouchel, Providence, for Gilbane Building Co.
Keenan, Rice, Dolan, Reardon & Kiernan, H. Eliot Rice, Providence, for Romans Associates, Inc.
Paul A. Anderson, Providence, for James J. O'Rourke d/b/a J. J. O'Rourke Electric Co.

OPINION
PAOLINO, Justice.
These cases are before this court on the appeals of the plaintiffs Elizabeth D. Holmes et al. d/b/a Charles A. Maguire & Associates in Superior Court case No. 73-860 and Air-Lite Products, Inc. in Superior Court case No. 73-917 from judgments entered for the defendants Romans Associates, Inc. and James J. O'Rourke d/b/a J. J. O'Rourke Electric Co. granting those defendants' motions for summary judgments. For convenience we shall hereinafter refer to the respective parties as "Maguire," "Air-Lite," "Romans" and "O'Rourke."
This matter has a long history dating back to November 23, 1962. An understanding of the issues raised by plaintiff-appellants requires a rather detailed discussion of the facts and proceedings which ultimately resulted in the instant appeals.
On November 23, 1962, an explosion and fire occurred at the Industrial National Bank Hardened Computer Center in Glocester, Rhode Island. The New Amsterdam Casualty Company (New Amsterdam) was the insurer of the owner, Industrial National Bank of Rhode Island (Industrial), and the general contractor, Gilbane Building Company (Gilbane). At the time O'Rourke and Romans were subcontractors of Gilbane in the construction of the computer center, and as such, were coinsured under the policy issued by New Amsterdam.
*625 New Amsterdam, after paying the claims of Industrial and Gilbane, totaling some $318,000, then became subrogated to their rights under the policy.
New Amsterdam, as subrogee, brought an action in the United States District Court for the District of Rhode Island (District Court) against O'Rourke, Homans, Air-Lite and Maguire, alleging that the negligence of several or all of them had caused the fire that necessitated the payment of the claim by New Amsterdam. New Amsterdam Cas. Co. v. Homans-Kohler, Inc., 305 F.Supp. 1017 (D.R.I.1969).
Both Maguire and Air-Lite filed cross-claims against O'Rourke and Homans in that case. They alleged in their claim against O'Rourke, that if there was any liability on their part to New Amsterdam, such liability would have been brought about by the active and primary negligence of O'Rourke without any negligence or fault on their part. In their cross-claims Maguire and Air-Lite each sought a judgment for indemnity against O'Rourke or, in the alternative, a judgment for contribution by O'Rourke as a joint tortfeasor under the provisions of our Uniform Contribution Among Tortfeasors Act. General Laws 1956 (1969 Reenactment) chapter 6 of title 10, entitled "Contribution Among Joint Tortfeasors."
O'Rourke, Homans and Air-Lite then moved for summary judgment with respect to the claims made against them by New Amsterdam. They based those motions on the ground that since New Amsterdam had also insured them, as Gilbane's subcontractors, for New Amsterdam to recover against them would be in violation of its obligations as their insurer. These motions were heard before the then Chief Judge Day. On September 23, 1969, he filed an opinion holding that New Amsterdam had no right of action against either O'Rourke or Homans, even if they were negligent, in the absence of fraud or design on their part. 305 F.Supp. at 1020 (1969). After noting that New Amsterdam conceded that O'Rourke and Homans were subcontractors of Gilbane on the subject construction project, id. at 1019, and after further noting that O'Rourke and Homans were coinsureds of Gilbane and Industrial under the policy in question, id. at 1020, Judge Day said:
"By accepting the premiums for their inclusion as co-insureds under said policy the plaintiff insurance company assumed the risk of any loss occasioned by their negligence, if, in fact, said fire was occasioned by the negligence of either or both of them as claimed by the plaintiff. No claim was made by the plaintiff that said fire was caused by the design or fraud of either of them." Id. at 1020.
Accordingly Judge Day granted the motions of O'Rourke and Homans for final summary judgments of dismissal in accordance with Fed.R.Civ.P. 54(b). On the strength of an unrebutted affidavit filed by the vice president of Gilbane, the District Court found that Air-Lite was not a subcontractor within the policy and therefore denied its motion for summary judgment against New Amsterdam.
O'Rourke then filed motions for summary judgment of dismissal of the cross-claims filed by Maguire and Air-Lite under our joint tortfeasor statute. These motions were also heard by Judge Day. On March 17, 1970, he filed a separate opinion granting the motions for summary judgment filed by O'Rourke. New Amsterdam Cas. Co. v. Homans-Kohler, Inc., 310 F.Supp. 374 (D.R.I.1970).
In holding that our joint tortfeasor act was not applicable Judge Day said:
"One of the primary purposes of the passage of said Act was to create a right of contribution among joint tortfeasors which did not exist at common law. (citation omitted) But it is well settled that its provisions apply only where there is a common liability in tort by the joint tortfeasors for the same injury to person or property. This common liability *626 may be either joint or several, but there can be no contribution unless the injured person has a right of action in tort against both the party who seeks contribution and the party from whom contribution is sought." Id. at 376.
He then referred to his earlier decision, saying:
"In an opinion filed in this case on September 23, 1969, 11 held that the plaintiff as the subrogee of said Gilbane Building Co. and said Industrial National Bank of Rhode Island had no right of action against O'Rourke for damages allegedly caused by his negligence, there being no claimed design or fraud on his part, because he was also an insured under said policy of fire insurance. New Amsterdam Casualty Company v. Homans-Kohler, Inc. et al., D.C.1969, 305 F.Supp. 1017. Since New Amsterdam Casualty Company has no right of action against O'Rourke to recover damages for his negligence, it follows that there is no common liability in tort for said damages to New Amsterdam Casualty Company by Air-Lite Products, Inc., Charles A. Maguire & Associates and O'Rourke. In the absence of such common liability, they are not joint tortfeasors under said Act among whom a right of contribution exists under said Act." Id. at 377.
With respect to the claim for indemnity, Judge Day held that a claim for noncontractural indemnity can be maintained only where there is tort liability on the part of the indemnitor to the injured person and since New Amsterdam had no right of action against O'Rourke for damages allegedly caused by its negligence, no right of action against O'Rourke for indemnity existed in favor of either Air-Lite or Maguire. Id.
Accordingly, as we stated above, on March 17, 1970, Judge Day granted O'Rourke's motions for summary judgment in its favor on the cross-claims of Air-Lite and Maguire. Sometime thereafter, Homans filed its own motion for summary judgment of dismissal of the cross-claims brought against it by Air-Lite and Maguire. These motions were heard by Judge Day and on May 19, 1970, he entered an order granting Homans' motion for final summary judgment dismissing the cross-claims of Air-Lite and Maguire.
New Amsterdam did not appeal from the order dismissing its claims against O'Rourke and Homans.
However, Air-Lite and Maguire did appeal from the orders dismissing their cross-claims.[1] On December 30, 1970, the United States Court of Appeals for the First Circuit, in an opinion written by the then Chief Judge Bailey Aldrich, affirmed Judge Day's orders dismissing the cross-claims of Air-Lite and Maguire, but disagreed with Judge Day's ruling that our joint tortfeasors act was inapplicable. New Amsterdam Cas. Co. v. Holmes, 435 F.2d 1232, 1234-35 (1st. Cir. 1970).[2]
The court of appeals held that the relationship of appellants (Air-Lite and Maguire) and appellees (O'Rourke and Homans) vis-à-vis Gilbane, assuming the negligence of all of them, is a typical joint tortfeasor situation. The court found nothing in the policy of the Contribution Among Joint Tortfeasors Act, or in its language, to make an exception depriving appellants of their right to seek contribution simply because appellees had personal *627 insurance. Thus the court held that the fact that the insurer of the building owner and contractor also insured two of the alleged joint tortfeasors did not make the joint tortfeasors act inapplicable as among the alleged joint tortfeasors. Then the court continued as follows :
"This does not mean that no consequence attaches to the insurance. There is a very substantial consequence. As a corollary to the district court's holding that plaintiff cannot recover from appellees because it had insured against their negligence, appellees, in turn, will be able to obtain from plaintiff reimbursement for any loss incurred by having to contribute to appellantsinstead of paying direct to Gilbaneby virtue of the statute. To avoid circuity of action, we hold that plaintiff cannot now recover against appellants to the extent that appellants could, in turn, compel contribution from appellees. (citation omitted) Applying such reasoning, we can approve the district court's result, dismissing appellants' cross-claim against appellees, even though we hold the contribution statute applies. We protect the cross-claim rights, in effect, by allowing a set-off: in affirming that dismissal we rule that if plaintiff succeeds in its present action against appellants, and appellants establish the joint negligence of appellees, there must be set off what, absent appellees' insurance, appellants can show they would have been able to recover from appellees by way of contribution." Id. at 1235.
No appeal was taken by any party from the action of the court of appeals.
On December 14, 1971, Air-Lite and Maguire settled the case brought against them by New Amsterdam for $42,500. The settlement consisted of $34,250 paid by Maguire's insurers, $4,000 by Air-Lite's insurer and $4,000 by a third insurer which did not pursue its subrogation rights in the pending Rhode Island state court proceedings. New Amsterdam executed a release wherein it released Maguire, Air-Lite, Homans and O'Rourke of all claims.

The Action in the Superior Court
After that settlement was made, Air-Lite brought the instant action in the Superior Court against Gilbane, O'Rourke and Homans, seeking contribution for the settlement payment made by it. Maguire brought a similar action.
The defendants O'Rourke and Homans filed motions for summary judgment against Air-Lite and Maguire. The motions were heard before a justice of the Superior Court. In her decision granting defendants' motions, she held that questions concerning the legal effect of Judge Aldrich's decision and plaintiffs' (Air-Lite and Maguire) settlement with New Amsterdam and how these elements affect plaintiffs' present claim for recovery, are obviously and exclusively questions of law. She therefore concluded that it was proper to entertain defendants' motions for summary judgment.
The trial justice agreed with Judge Aldrich's interpretation of our contribution among joint tortfeasors act and held that § 10-6-8[3] of the act, entitled "Liability to contribution of tortfeasor released by injured person," when considered with Judge Aldrich's opinion, provided a sound and compelling legal basis for dismissing plaintiffs' claims. She based her conclusion on the fact that defendants, Homans and *628 O'Rourke, met the description of a "released joint tortfeasor" as set forth in § 10-6-8 and should not, therefore, be liable for contribution to plaintiffs, designated in § 10-6-8 as "another joint tortfeasor."
The trial justice next discussed the three conditions which she said defendants must have satisfied in order to be relieved of the liability of contribution under § 10-6-8. She stated that the first two of these conditions are that (1) defendants must have obtained a release from New Amsterdam (the injured party), and (2) they must have obtained it before plaintiffs (Maguire and Air-Lite) were entitled to secure a money judgment for contribution. Citing Judge Aldrich's decision as authority, the trial justice construed New Amsterdam's decision not to appeal Judge Day's summary dismissal of New Amsterdam's direct claims against O'Rourke and Homans as a release of O'Rourke and Homans by New Amsterdam. Because this release was given before plaintiffs secured the right to a money judgment for contribution, as provided in § 10-6-4,[4] the trial justice held that the first two conditions of § 10-6-8 were satisfied.
The trial justice next discussed the third, condition contained in § 10-6-8, pointing out that it required that the release provide for a reduction, to the extent of the pro rata share of the released tortfeasor, of the injured person's damages recoverable against all other tortfeasors. After pointing out that initially defendants' release from liability to New Amsterdam was not conditioned upon such a pro rata reduction, she held that Judge Aldrich's opinion imposing a set-off mechanism, which was induced by the fact that defendants had already been released and that New Amsterdam would have to insure defendants for contribution, achieved the exact effect contemplated by the "pro rata reduction" in § 10-6-8. She referred specifically to Judge Aldrich's ruling that
"To avoid circuity of action, we hold that plaintiff cannot now recover against appellants to the extent that appellants could, in turn, compel contribution from appellees." New Amsterdam Cas. Co. v. Holmes, supra at 1235.
She then pointed out that the limitation placed upon New Amsterdam's recovery constituted a reduction to the extent of O'Rourke's and Homans' pro rata share of the damages to New Amsterdam; that as a result of Judge Aldrich's decision, New Amsterdam realized that it could not recover a full measure of damages from Maguire and Air-Lite, if it returned to the District Court, and would be limited by an amount defined as defendants' pro rata share; and that plaintiffs also realized the importance of the limitation placed upon New Amsterdam's recovery.
She concluded that the settlement between New Amsterdam and plaintiffs represented their decision to avoid costly litigation and to exercise their right and privilege to arrive at their own evaluation of the pro rata shares involved, instead of returning to the District Court for a judicial determination of the amounts involved; that the parties were aware that Judge Aldrich's decision was a final, conclusive and enforceable adjudication of what New Amsterdam could recover from plaintiffs; and that the fact that the exact amounts involved were not judicially determined presented no problem and created no question of fact necessitating further litigation, since New Amsterdam and plaintiffs were free to assign their own estimate of the shares of liability involved and did just *629 that in settling. She held that to allow plaintiffs the opportunity to recover from defendants at this point would violate the spirit of § 10-6-8, by giving them the chance to obtain a double "pro rata reduction."
The trial justice also gave the following additional reasons for dismissing plaintiffs' present claims against defendants O'Rourke and Homans: (1) to allow plaintiffs in court would violate Judge Aldrich's attempt to avoid circuity of action; (2) Section 10-6-5[5] presents a serious question as to plaintiffs' right and standing to seek contribution from defendants, since defendants were released from liability to New Amsterdam by a judicial ruling, and, therefore, plaintiffs' settlement with New Amsterdam could not have released the already released defendants; and (3) to allow plaintiffs in court now would render the federal court proceedings of no value and would allow plaintiffs to litigate precisely that which they should have litigated back in the federal court after Judge Aldrich's opinion.
Finally, the trial justice found no merit in plaintiffs' claim for indemnification for the following reasons: (1) defendants took no part in and were not released by the settlement between plaintiffs and New Amsterdam; (2) Judge Day decided that plaintiffs had no right to indemnification and his decision had become final; and (3) Judge Aldrich's opinion recognized only plaintiffs' right to contribution from defendants and did not recognize a right to indemnification.
The plaintiffs offer many arguments in their briefs most of which attack the validity of the trial justice's finding of compliance with the requisites of § 10-6-8 relieving defendants from liability for contribution. We do not consider these here because we believe that the doctrine of res judicata is dispositive of the entire matter. That defense was asserted by various defendants at various stages of the pleadings and in their motions for summary judgment but was apparently not considered by the trial justice in her deliberations on those motions. The fact that the affirmative defense of res judicata was not raised by defendant O'Rourke in its answers or amended answers to the complaints filed by Air-Lite and Maguire poses no impediment to our finding that the doctrine applies to its case as well as to that of co-defendant Homans. Affirmative defenses may be established upon motion for summary judgment when the record reveals an undisputed set of facts upon which the movant is entitled to judgment as a matter of law. Suckow Borax Mines Consol., Inc. v. Borax Consol., Ltd., 185 F.2d 196, 205 (9th Cir. 1950). Res judicata is normally pleaded as an affirmative defense under Super.R.Civ.P. 8(c) but where no substantive rights are in jeopardy the manner in which the defense is raised has little or no import. 348 Bloomfield Avenue Corp. v. Montclair Mfg. Co., 90 F.Supp. 1020, 1021 (D.N.J.1950). In the present case, Homans' motions for summary judgment and memorandum in support thereof assert the defense of res judicata. O'Rourke, in its memorandum supporting its own Rule 56 motions, expressly incorporated the argument of codefendant Homans in this regard. Therefore, the purpose of Rule 8(c) to avoid unfair surprise to a party whose claim is subject to affirmative defense is herein satisfied. Every party was fairly apprised of the possibility that the claim was subject to avoidance by virtue of the final judgments entered in the federal action. We may therefore proceed to consider the application of the doctrine in the instant case.
*630 In order for res judicata to apply to bar a cause of action, there must be (1) identity of parties, (2) identity of issues and (3) finality of judgment. DiSaia v. Capital Industries, Inc., 113 R.I. 292, 298, 320 A.2d 604, 607 (1974). The doctrine's effect is to bar relitigation of all issues that were tried or might have been tried in the original suit by any court of competent jurisdiction. Providence Teachers Union, Local 958 v. McGovern, 113 R.I. 169, 172, 319 A.2d 358, 361 (1974). Regarding the status of matters decided by summary judgment, it is accepted that such matters are final and appealable and are res judicata in a subsequent action. 3 Barron & Holtzoff, Federal Practice & Procedure § 1246 (Wright ed. 1958); 1 Kent, R.I.Civ. Prac. § 56.12 (1969). One noted authority states:
"A summary judgment motion goes to the merits of the case and, because it does not simply raise a matter in abatement, a granted motion operates to merge or bar the cause of action for purposes of res judicata." 10 Wright & Miller, Federal Practice & Procedure § 2712 at 386 (1973).
Thus, in a case where the issues were disposed of by summary judgment, a Rule 56 motion will be granted in a later proceeding wherein the same issues are raised. That is, the proper vehicle for disposing of an action barred by res judicata is the issuance of a summary judgment. Id. § 2735.
Turning our attention to the present case, it is obvious that there is the requisite identity of parties between this action and the cross-claims disposed of by Judge Day's orders. It is equally clear from our statement above regarding the finality and appealability of summary judgments generally, that the summary judgments at issue here fulfill the doctrine's requirement of finality. Air-Lite, however, protests that res judicata cannot be said to apply here because the present cause of action did not arise until the settlement between themselves and New Amsterdam, an event which post dated the federal judgment by 12 months. The thrust of the argument is that the issues raised by the settlement are different from those raised by the cross-claims; in short, that there is lacking the requisite identity of issues. We find this proposition difficult to accept. If Air-Lite's and Maguire's causes of action against Homans and O'Rourke first arose, as the present argument implies, only after the settlement with New Amsterdam, we are at a complete loss to understand exactly what these plaintiffs sought to gain by their federal cross-claims. Were they not pursuing the very same relief that they pursue here, to wit, indemnity, or, in the alternative, contribution? Do not both cases, therefore, raise identical issues? The plaintiffs may indeed be correct in saying that Judge Aldrich's opinion admits the potential liability of these defendants under the joint tortfeasors act. The plaintiffs' argument, however, fails to account for the fact that, for policy reasons, they were stripped of their ability to sue on that potential liability. The circuit court's opinion held that any contribution to which planitiffs are entitled comes to them derivatively and in the form of a set-off through the cause of action that New Amsterdam brought against them in federal court. That cause of action was extinguished by the settlement and release. The plaintiffs were deprived of all right to sue defendants directly for contribution by virtue of the federal decisions. Therefore all matters that were tried or that could have been tried in the dispute among these parties have been finally resolved by the issuance of the summary judgments on the cross-claims and by the settlement of the primary cause of action. We need not rule on the correctness of any of the federal adjudications for it is settled law in this state that for an issue to be res judicata, it is not necessary that the prior judgment be correct. A judgment may be erroneous in law, but if it becomes *631 final it is still binding and conclusive as between the parties upon the question. Lopes v. Mallory, 108 R.I. 694, 698, 279 A. 2d 450, 452 (1971). This doctrine of repose rests not upon the correctness of judgments but upon the public policy favoring the finality of judgments. See Reed v. Allen, 286 U.S. 191, 199-200, 52 S.Ct. 532, 533-34, 76 L.Ed. 1054, 1057 (1932); Ballard v. First Nat'l Bank, 259 F.2d 681, 683-84 (5th Cir. 1958).
The plaintiffs should not be heard to complain that this works an injustice upon them because we must presume that they sought to preserve their own best interests when they entered into the settlement negotiations with New Amsterdam. One of Judge Aldrich's primary reasons for reaching the result he reached was that he sought to avoid what he called "circuity of action"that is, to avoid the situation whereby Homans and O'Rourke, if subjected to an adverse verdict, would turn again and sue New Amsterdam as their insurer. To accomplish this he sustained the dismissal of the cross-claims against Homans and O'Rourke and limited New Amsterdam's possible recovery against Air-Lite and Maguire to the latter parties' pro rata shares of the damages assumed by New Amsterdam as subrogee of the original claim. Air-Lite and Maguire entered into their negotiations with New Amsterdam with full knowledge of the circuit court opinion and, absent any finding or allegation to the contrary, we must assume that these parties sought and obtained a release, the consideration for which would not exceed the ceiling that had been placed upon their liability.
These plaintiffs have not here or in the proceedings below urged that the release they obtained was tainted by fraud or illegality. All that is apparent from the record before us is that plaintiffs opted to bypass their judicial remedy in favor of the more expeditious route of settlement and release. It is apparent that their primary concern was not the avoidance of the headaches of litigation since the current litigation was instituted entirely separately from the federal action and has, no doubt, caused even greater headaches than a trial on remand in the federal court would have caused.
We hold, therefore, that the final judgment in the federal court is res judicata in the present case. Since summary judgment in the Superior Court would have been the proper vehicle for effectuating the doctrine, Wright & Miller, supra § 2735, we will allow the summary judgment issued therein to stand although it was in fact issued on the strength of a somewhat different line of reasoning.
The plaintiffs' appeals are denied and dismissed, the judgments appealed from are affirmed, and the cases are remitted to the Superior Court.
NOTES
[1]  original plaintiff, New Amsterdam, did not participate in those appeals but after the oral argument, envisaging that resolution of the rights of Air-Lite and Maguire in relation to O'Rourke and Humans inter sere might affect the ultimate rights of plaintiff New Amsterdam, an order was entered by the United States Court of Appeals for the First Circuit, permitting New Amsterdam to appear and brief its position on the issues to be considered by that court. New Amsterdam Cas. Co. v. Holmes, 435 F.2d 1232 (1st Cir. 1970).
[2]  In interpreting our joint tortfeasors act, the court of appeals relied heavily on our interpretion of the act in Zarrella v. Miller, 100 R.I. 545, 217 A.2d 673 (1966).
[3]  General Laws 1956 (1969 Reenactment) § 10-6-8 reads as follows :

"Liability to contribution of tortfeasor released by injured person.A release by the injured person of one (1) joint tortfeasor does not relieve him from liability to make contribution to another joint tortfeasor unless the release is given before the right of the other tortfeasor to secure a money judgment for contribution has accrued, and provides for a reduction, to the extent of the pro rata share of the released tortfeasor, of the injured person's damages recoverable against all the other tortfeasors."
[4]  General Laws 1956 (1969 Reenactment) § 10-6-4 reads as follows :

"Payment as prerequisiteLimitation of actions.A joint tortfeasor is not entitled to a final money judgment for contribution until he has by payment discharged the common liability or has paid more than his pro rata share thereof. Actions for contribution shall be commenced not later than one (1) year next after the first payment made by a joint tortfeasor which has discharged the common liability or is more than his pro rata share thereof."
[5]  General Laws 1956 (1969 Reenactment) § 10-6-5 reads as follows :

"Separate settlement with injured person. A joint tortfeasor who enters into a settlement with the injured person is not entitled to recover contribution from another joint tortfeasor whose liability to the injured person is not extinguished by the settlement."
