Judgment, Supreme Court, New York County (Burton Sherman, J.), entered June 6, 1991, which dismissed defendants’ counterclaims and awarded plaintiffs $27,446, exclusive of interest, unanimously modified on the *185law, to reduce the judgment by $5,800, to make a total award of $21,646, exclusive of interest, and, as so modified, affirmed, without costs.
The mere filing of a notice of pendency is not an actionable wrong, but its continuation on appeal by the posting of an undertaking creates liability if damages are demonstrated (Chain Locations v T.I.M.E.—DC, Inc., 99 AD2d 111). Here, with respect to the award of $21,646 for expenses plaintiffs incurred in the action brought by their prospective purchasers, IAS properly determined that there existed only a three week period during which the notice of pendency could have been vacated thus permitting a sale of plaintiffs’ house to the purchasers, and that it would have been improvident for plaintiffs to proceed with the sale since defendants’ motion to reargue the discharge of the notice of pendency was outstanding.
However, the award of $5,800 for attorneys’ fees, expended by plaintiffs in litigating the injunction against the sale of the house, should not have been granted. The right to damages depends on whether the party obtaining a preliminary injunction, was entitled to it, and not on whether the other party eventually prevails on the merits (Margolies v Encounter, Inc., 42 NY2d 475).
Here, as plaintiffs fail to demonstrate that the injunction and stay of cancellation of the notice of pendency were improvidently granted, they are not entitled to recover monies expended for legal fees incurred in litigating the injunction.
Defendants’ other claims of error are either without merit or unnecessary to address in light of our disposition herein. Concur—Carro, J. P., Rosenberger, Wallach, Ross and Asch, JJ.