Appeal from a judgment of the Supreme Court, Onondaga County (Thomas J. Murphy, J.), entered October 2, 2006. The judgment, after a nonjury trial, dismissed the complaint against defendants Edgewater Construction Co., Inc., W. Gary Craig and Thomas R. Kennedy.
It is hereby ordered that the judgment so appealed from be *1305and the same hereby is unanimously reversed on the law without costs, the second and fourth causes of action are reinstated insofar as they seek indemnification for the legal fees reasonably incurred in the two underlying actions, judgment is granted in favor of plaintiff and against defendants Edgewater Construction Co., Inc., W Gary Craig and Thomas R. Kennedy on those causes of action to that extent and the matter is remitted to Supreme Court, Onondaga County, for further proceedings in accordance with the following memorandum: As we noted when this case was previously before us, plaintiff, as surety, provided defendant Edgewater Construction Co., Inc. (Edgewater) with performance and payment bonds in connection with a building construction project, and Edgewater and its principals, including defendants W. Gary Craig and Thomas R. Kennedy, entered into an indemnity agreement pursuant to which they agreed to indemnify plaintiff for losses and expenses incurred in connection with the bonds (Hartford Fire Ins. Co., Inc. v Edgewater Constr. Co., Inc., 21 AD 3d 1312 [2005]). Plaintiff commenced this action in January 2002 against, inter alia, Edgewater, Craig, and Kennedy (collectively, defendants), seeking, inter alia, indemnification for the payments that it made during the course of previous extended litigation on the bonds. Plaintiff moved for summary judgment on the complaint and, in the prior appeal, we determined that Supreme Court properly denied that part of the motion seeking reimbursement for payments made by plaintiff to stabilize the building pursuant to the performance bond and for legal fees incurred by plaintiff in its defense of the actions commenced against plaintiff and Edgewater on the ground that there was “a triable issue of fact whether those payments were reasonable under the terms of the indemnity agreement at issue” (id. at 1313). Following a bench trial on that issue, the court dismissed the complaint against defendants based upon its determination that the payments made by plaintiff were not reasonable.
We agree with plaintiff that, pursuant to the terms of the indemnity agreement, plaintiff is entitled to recover the legal fees reasonably incurred in defending the two underlying actions against it even in the event that the actions were groundless (see generally Lori-Kay Golf v Lassner, 61 NY2d 722, 723-724 [1984]). The fees that plaintiff may recover include the initial costs of answering the complaints, the costs of conducting the discovery by which plaintiff ascertained that the performance bond had expired and that MS Partnership was not a proper claimant upon that bond, and the fees incurred in moving for summary judgment on the defenses raised in the answers. We therefore reverse the judgment, reinstate the *1306second and fourth causes of action insofar as they seek indemnification for the legal fees reasonably incurred in those two actions, grant judgment in favor of plaintiff and against defendants on those two causes of action to that extent and remit the matter to Supreme Court to determine the amount of legal fees reasonably incurred.
We further conclude, however, that the court properly determined that plaintiff failed to establish that the remaining payments that it made were reasonable. The evidence at trial established that plaintiff was fully aware that there was no valid claim against it for payment under the performance bond and, indeed, plaintiffs answers in the two underlying actions raised the defenses upon which the court eventually granted plaintiff’s motion for summary judgment dismissing the amended complaint in the second of the two actions. In any event, with respect to the costs of hiring experts and contractors, stabilizing the building, and the other nonlitigation expenditures made by plaintiff, we agree with defendants that those payments were not required under the terms of the performance bond and thus that the indemnity agreement does not encompass those payments. Pursuant to the terms of the indemnity agreement, “[t]he indemnitors will indemnify and hold the Surety harmless from all loss, liability, damages and expenses . . . which the Surety incurs or sustains (1) because of having furnished any Bond, or (2) because of the failure of an indemnitor to discharge any obligations under this Agreement, or (3) in enforcing any of the provisions of this Agreement.” The payments in question were not required under any of those provisions and thus were unreasonable.
We have considered plaintiff’s remaining contentions and conclude that they are without merit. Present—Hurlbutt, J.P., Martoche, Smith, Fahey and Pine, JJ.