In an action to recover the amount of tax liens on the *362defendants’ real estate which was paid by the plaintiff, the plaintiff appeals from so much of an order of the Supreme Court, Rockland County (Bergerman, J.), dated June 11, 2002, as denied that branch of its motion which was for summary judgment and granted the defendants’ cross motion for summary judgment dismissing the complaint.
Ordered that the order is reversed insofar as appealed from, on the law, with costs, that branch of the motion which was for summary judgment is granted, the cross motion is denied, the complaint is reinstated, and the matter is remitted to the Supreme Court, Rockland County, for entry of an appropriate judgment in favor of the plaintiff and against the defendants.
The plaintiff National Granite Title Insurance Agency, Inc. (hereinafter National), issued a title insurance policy to the nonparty-purchaser of the defendant sellers’ property which mistakenly failed to indicate that a portion of the property was subject to tax liens. Paragraph 7 (a) of the sales contract between the nonparty-purchaser and the defendant sellers provided that real estate taxes were to be adjusted prior to closing, and paragraph 7 (c) provided, inter alia, that any errors or omissions in computing closing adjustments shall be corrected. Further, paragraph 7 (c) provided that this provision would survive the closing. After the closing of title on the subject property, National learned that a portion of the property was subject to tax hens, and paid the amount of those liens on behalf of the nonparty-purchaser in accordance with the terms of its title insurance policy. National then commenced this action against the defendant sellers seeking to recover, as subrogee of the nonparty-purchaser, the money it paid to satisfy the tax liens.
Where the contract, as here, is unambiguous, “its interpretation is a matter of law and effect must be given to the intent of the parties as reflected by the express language of the agreement” (Riley v South Somers Dev. Corp., 222 AD2d 113, 117 [1996] [internal quotation marks omitted]). In the case at bar, the subject real estate tax liens were the sole obligation of the defendant sellers. However, those tax liens were omitted in computing closing adjustments. The doctrine of subrogation is applicable where a party, such as the plaintiff herein, has a legal duty to pay the debts of another for the protection of some benefit (see Gerseta Corp. v Equitable Trust Co., 241 NY 418 [1926]; cf. Bermuda Trust Co. v Ameropan Oil Corp., 266 AD2d 251 [1999]; Cohn v Rothman-Goodman Mgt. Corp., 155 AD2d 579 [1989]). Accordingly, the Supreme Court erred in denying that branch of National’s motion which was for summary judgment and in granting the cross motion of the defendant sellers’ for *363summary judgment dismissing the complaint. Prudenti, P.J., Ritter, Adams and Cozier, JJ., concur.