Cross appeals from an order of the Supreme Court (Bradley, J.), entered April 12, 2001 in Ulster County, which denied defendant’s motion for summary judgment dismissing the complaint and partially granted plaintiffs’ cross motion for summary judgment.
A patron of a bar owned and operated by plaintiffs* was injured when he was assaulted by plaintiffs’ off-duty employee. *741The patron sued plaintiffs in 1993, alleging causes of action for assault, dram shop liability and negligent hiring and/or supervision. When defendant refused plaintiffs’ demand to defend and indemnify them in the underlying tort action, a declaratory judgment action was commenced. In 1998, Supreme Court granted defendant’s cross motion for summary judgment concluding that it was bound by the holding of the Court of Appeals in U.S. Underwriters Ins. Co. v Val-Blue Corp. (85 NY2d 821) and finding that there was “no coverage under the intentional tort exclusion of the policy even when the underlying complaint also contains causes of action for negligent hiring.” No appeal was ever taken from Supreme Court’s 1998 judgment, nor was there any attempt to reopen the judgment (see, CPLR 5015 [a]).
At the trial of the patron’s tort action seven years after the action was commenced, the jury returned a verdict against plaintiffs on the negligence claim. This second declaratory judgment action was commenced by plaintiffs seeking indemnification and counsel fees incurred in the defense of the underlying tort action. After issue was joined, both parties moved for summary judgment. Supreme Court granted plaintiffs summary judgment for the amount of the judgment filed against them, claiming that it “clearly erred in its previous decision” and finding that the insurance policy in question provided coverage for plaintiffs’ negligent acts. Defendant appeals claiming, inter alia, that the doctrine of res judicata bars plaintiffs’ second identical declaratory judgment action. Plaintiffs cross-appeal arguing, inter alia, that the counsel fees they incurred in defense of the underlying claim should have been included in Supreme Court’s order.
Since we find the doctrine of res judicata applicable to the facts presented here, we reverse that portion of Supreme Court’s order that partially granted plaintiffs’ cross motion for summary judgment. It is beyond cavil that the doctrine of res judicata operates to bar future litigation between the same parties of a cause of action based on the same transaction where the cause of action was raised or could have been raised in a prior proceeding (see, O'Brien v City of Syracuse, 54 NY2d 353, 357; Evergreen Bank v Dashnaw, 246 AD2d 814, 815). Notwithstanding Supreme Court’s conclusion to the contrary, *742we find that plaintiffs’ second declaratory judgment action is precluded because plaintiffs’ claim that defendant should indemnify them in the underlying action was the subject matter of the first declaratory judgment action (see, Matter of Schulz v New York State Legislature, 278 AD2d 710, 712).
In light of the above, the remaining issues raised on this appeal are rendered academic.
Cardona, P.J., Peters, Carpinello and Mugglin, JJ., concur. Ordered that the order is modified, on the law, without costs, by reversing so much thereof as partially granted plaintiffs’ cross motion for summary judgment; cross motion denied in its entirety, motion granted, summary judgment awarded to defendant and it is declared that defendant does not have a duty to defend and indemnify plaintiffs in the underlying action; and, as so modified, affirmed.