The plaintiffs commenced an action in the Housing Court of Hampden County alleging that the de *556 fendants failed to provide adequate water pressure to the plaintiffs’ two-family home. The plaintiffs claimed that this failure constituted a tort and a breach of contract. They sought injunctive relief and damages for the loss of rental income, for the loss of good will in their business, and for interference with the enjoyment of their home. After trial in the Housing Court, but before judgment, the plaintiffs moved for voluntary dismissal of their action on the ground that the Housing Court lacked subject matter jurisdiction. The judge denied the motion and thereafter judgment was entered for the defendants on the merits. The plaintiffs did not appeal.
Subsequently the plaintiffs brought in the Superior Court the action which is before us on appeal. Except for the addition to the Superior Court complaint of a claim under G. L. c. 93A, the Superior Court and Housing Court actions were identical in all significant respects. Relying on the principles of res judicata and collateral estoppel, the defendants moved for summary judgment in the Superior Court on the ground that the action in that court was precluded by the Housing Court judgment. A judge of the Superior Court allowed the motion and a judgment dismissing the complaint was entered. The plaintiffs appealed, claiming that the Housing Court judgment does not bar the action in the Superior Court because the Housing Court lacked subject matter jurisdiction of the controversy. We transferred the case to this court on our own motion.
General Laws c. 258, § 2, as appearing in St. 1978, c. 512, § 15, provides that “[pjublic employers shall be liable for injury or loss of property or personal injury or death caused by the negligent or wrongful act or omission of any public employee while acting within the scope of his office or employment, in the same manner and to the same extent as a private individual under like circumstances.” It further provides that “[t]he remedies provided by [c. 258] shall be exclusive of any other civil action or proceeding by reason of the same subject matter against the public employer . . . .” General Laws c. 258, § 3, as appearing in St. 1978, c. 512, § 15, pro
*557
vides that “[t]he superior court shall have jurisdiction of all civil actions brought against a public employer.” There is no grant of jurisdiction to any court other than the Superior Court in G. L. c. 258. Since the defendants are “public employers” as defined by G. L. c. 258, § 1, the plaintiffs argue that the Superior Court had exclusive jurisdiction of their claims despite G. L. c. 185C, § 3, as amended by St. 1979, c. 72, § 3. General Laws c. 185C, § 3, provides that “[t]he divisions of the housing court department shall . . . have jurisdiction of all housing problems . . . .” The parties assume, as do we, that their controversy relates to a housing problem. Concluding that G. L. c. 185C does not extend the jurisdiction of the Housing Court to “housing problem” claims against “public employers,” and relying on
Almeida
v.
Travelers Ins. Co.,
The defendants argue that if G. L. c. 258 and G. L. c. 185C are read harmoniously, the provision in G. L. c. 185C, § 3, that the Housing Court shall have jurisdiction of “all housing problems” must be construed to include claims against public employers. The defendants argue that therefore the requisites for claim preclusion have been met and that the judge in the Superior Court properly allowed the defendants’ summary judgment motion.
In the opinion of a majority of the court, G. L. c. 185C, § 3, as amended by St. 1979, c. 72, § 3, conferred jurisdiction on the Housing Court over the claims asserted by the plaintiffs in their original action (“all housing problems, including all contract and tort actions which affect the health, safety and welfare of the occupants or owners” of property within the geographical jurisdiction of the court). Even *558 assuming, without deciding, that any claim originally asserted by the plaintiffs was affected by G. L. c. 258 (the Massachusetts Tort Claims Act), adopted in 1978 (St. 1978, c. 512, § 15), in the opinion of a majority of the court the provision for exclusive jurisdiction in the Superior Court over any such claims (G. L. c. 258, § 2) was eliminated by the expansion of the Housing Court jurisdiction in 1979. Although dispositive of the case, we do not decide the case on that ground alone. In addition, in the interest of finality of judgments, we unanimously hold that relitigation of the plaintiffs’ claims is precluded regardless of whether the Housing Court had subject matter jurisdiction.
By attempting to relitigate in the Superior Court the same claim on which judgment had previously been entered in the Housing Court, the plaintiffs have challenged the Housing Court judgment collaterally.
3
If we were to permit such an attack as a general rule, the finality of judgments would be substantially impaired. This would not be in the best interests of litigants or the public. While it is important that judgments be rendered only by courts having the right to render them, it is also important that controversies be finally terminated after there has been full and fair litigation. As we observed in
Wright Mach. Corp.
v.
Seaman-Andwall Corp.,
This is not a case in which we should give precedence to the principle of validity of judgments over the principle of finality, because here the plaintiffs commenced their action in the Housing Court, had a full and fair trial, lost on the merits, and chose not to appeal. 4 Thus, there is no unfairness to the plaintiffs in holding that, as to them, the Housing Court judgment is final. Furthermore, whether the Housing Court had subject matter jurisdiction is fairly debatable, so the assumption of jurisdiction by the Housing Court does not constitute a clear and serious disregard of a statutory allocation of power between courts. We perceive no adverse impact on the public interest that would result from applying in this case the same claim preclusion rule that would be applied if the plaintiffs were attacking the Housing Court judgment on the basis of nonjurisdictional substantive or procedural error.
Our holding is not inconsistent with the principle that we have enunciated in cases such as
Litton Business Syss.
v.
Commissioner of Revenue,
We have noted the plaintiffs’ reliance on our statement in
Almeida
v.
Travelers Ins. Co., supra
at 229, that “[t]he essential elements necessary to preclude relitigation of an issue are ‘identity of cause of action and issues, the same parties, and judgment on the merits by a court of competent jurisdiction.’
Franklin
v.
North Weymouth Coop. Bank,
Judgment affirmed.
Notes
An attack on a judgment that is made in the case in which the judgment is rendered, either in the trial court or in an appellate court, is a direct attack on the judgment. Collateral attack, on the other hand, refers to challenging a judgment in an independent proceeding.
We note that after trial, but before judgment, the plaintiffs moved for voluntary dismissal on the ground that the Housing Court lacked jurisdiction of the subject matter, and that their motion was denied. While that fact supports our holding, see Restatement (Second) of Judgments, § 12 comment c, illustration 1 (1982), our holding does not turn on it.
Durfee
v.
Duke,
