Lavery, J.
This appeal presents the question whether the doctrine of res judicata prevents a plaintiff from bringing a second lawsuit on a claim, originally brought in a prior lawsuit, where the trial court in the original case, with the consent of the parties, ordered that the claim be severed and tried separately.
The facts are not in dispute. Holly Flor hired Marrón and Sipe Building and Contracting Corporation (Marron-Sipe) to construct the New Milford Car Wash. Marron-Sipe subcontracted with A. J. Masi Electric Co., Inc. (Masi), to perform all the electrical work on the facility. On September 29,1987, Masi sued Marron-Sipe to receive payment for its electrical contracting services (case number 290323). On November 18, 1987, *567Marron-Sipe brought a complaint against Holly Flor and the New Milford Car Wash, Inc., seeking payment for the cost of labor and material in constructing the car wash and also seeking the cost of Masi’s electrical contracting services (case number 43905). Masi was not a party to case number 43905. The trial court in case number 43905, with the consent of the parties, ordered that Marron-Sipes’ claim against Holly Flor and the New Milford Car Wash, Inc., for the cost of electrical contracting be severed and tried separately. On December 15,1987, Marron-Sipe brought a third party complaint in case number 290323 against Holly Flor and the New Milford Car Wash, Inc., for the cost of Masi’s electrical contracting, thus consolidating all of the parties to the dispute over the cost of the electrical contracting in case number 290323. Case number 290323 was then transferred from Danbury Superior Court to Litchfield, and the case number 47115 was assigned to it.
The third party defendants, Holly Flor and the New Milford Car Wash, Inc., believe that the third party plaintiff’s claim for the cost of the electrical services cannot now be brought in case number 47115 because it could have been brought in case number 43905. The third party defendants therefore filed a motion for leave to amend their answer to the third party complaint to include the special defense of res judicata. They appeal from the trial court’s denial of their motion. The case was tried to a conclusion and a judgment was rendered for the plaintiff, Masi, against the defendant, Marron-Sipe, and for Marron-Sipe as third party plaintiff against the third party defendants Holly Flor and New Milford Car Wash, Inc., the appellants herein. The special defense of res judicata is the only issue on appeal.
The courts of this state follow the Restatement (Second), Judgments, in applying the doctrine of res judicata. See Orselet v. DeMatteo, 206 Conn. 542, *568544-46, 539 A.2d 95 (1988); Duhaime v. American Reserve Life Ins. Co., 200 Conn. 360, 363-65, 511 A.2d 333 (1986). The Restatement (Second), Judgments § 26, provides in part: “When any of the following circumstances exists, the [doctrine of res judicata] does not apply to extinguish the claim, and part or all of the claim subsists as a possible basis for a second action by the plaintiff against the defendant: (a) The parties have agreed in terms or in effect that the plaintiff may split his claim, or the defendant has acquiesced therein; or (b) The court in the first action has expressly reserved the plaintiffs right to maintain the second action . . . .’’On the basis of § 26 of the restatement, the trial court did not err in denying the third party defend- • ants’ motion to amend their pleading to include the special defense of res judicata. The parties were entitled to litigate the matter once in a court of law and the trial court properly gave them their day in court.
There is no error.
In this opinion the other judges concurred.