—Order, Supreme Court, New York County (Beatrice Shainswit, J.), entered June 17, 1998, which granted plaintiffs’ motion to discharge a bond that they furnished as an undertaking and denied defendants’ cross-motion to foreclose on the undertaking, unanimously reversed, on the law, with costs, plaintiffs’ motion denied, defendants’ cross-motion granted, and the matter remanded for a hearing on the amount of damages sustained by defendants.
Plaintiffs commenced an action against defendants on or about June 13, 1997, alleging breach of contract, breach of fiduciary duties, fraud, conversion and gross negligence. They sought $1 million in damages. On Juné 26, plaintiffs moved for a pre-action order of attachment, pursuant to CPLR 6201 and 6210, by order to show cause. The court set a hearing date for the attachment motion, and granted a temporary restraining order that restricted defendants from transferring any assets to the extent of $1 million while the motion was pending. The order to show cause also provided that “the plaintiff’s undertaking be and the same hereby is filed in the sum of $50,000 conditioned that the plaintiffs, if it is finally determined that plaintiffs were not entitled to a temporary restraining order, will pay to the defendants * * * all damages and costs which may be sustained by reason thereof’.
A hearing was held on July 7, 1997 on the motion for an attachment. By order dated August 26, the court denied plaintiffs’ motion, finding that they had not shown a likelihood of success on the merits. The court stated that “the order of attachment granted on June 26, 1997, is vacated”. Its use of this terminol*151ogy was unfortunate and has caused confusion in the parties’ appellate arguments. The ex parte relief granted on June 26 more closely resembled a temporary restraining order than an order of attachment: it contained no provision for the sheriff to levy on defendants’ property and the court did not direct plaintiffs to make a motion on notice within five days so as to provide defendants with a swift post-attachment hearing, as required by CPLR 6211. Furthermore, in the quoted section of the June 26 order to show cause which provided for an undertaking, the court used the words “temporary restraining order” to describe the ex parte relief it was granting.
The instant appeal arises out of defendants’ attempt to foreclose on the undertaking. After the restraint on defendants’ assets was vacated on August 26, plaintiffs moved to discharge the undertaking, claiming that defendants could not have incurred any damages between June 26 and the hearing date of July 7. In opposition, defendants asserted that the relevant period was June 26 to August 26, when the restraining order was actually vacated, and that they had sustained damages including lost interest on the restrained assets and attorneys’ fees from opposing the attachment motion. Defendants accordingly cross-moved to foreclose on the undertaking, pursuant to CPLR 6212 and 6313.
The motion court discharged the undertaking and denied defendants’ cross-motion. It correctly reasoned that CPLR 6212, which gives a defendant the right to foreclose on the undertaking if an attachment is erroneously granted, does not apply where (as here) there was no attachment in the first place because defendants defeated plaintiffs’ motion for an attachment (Provisional Protective Comm. v Williams, 121 AD2d 271). However, the court erred in neglecting to reach the issue of whether defendants are entitled to relief under CPLR 6313. We conclude that they are entitled to such relief. Alternatively, if the ex parte order were deemed an attachment, defendants would have a right to foreclose on the undertaking under CPLR 6212 instead. As noted above, this does not seem to be the most accurate characterization of the court’s order, so defendants’ rights will be analyzed under CPLR article 63.
CPLR 6212 and 6313 are parallel statutory sections designed to mitigate the risks of different types of pre-action restrictions on a defendant’s property. CPLR 6212 allows foreclosure on an undertaking only after an order of attachment has been issued and then determined to have been wrongful. CPLR 6313 provides analogous relief for a wrongfully issued temporary restraining order. The two remedies are independent of one *152another (A & M Exports v Meridien Intl. Bank, 222 AD2d 378, 380). Thus, regardless of the unavailability of CPLR 6212 relief in a situation where no attachment was ever ordered, pursuant to CPLR 6313 defendants may seek to recoup losses caused by an improper ex parte restraining order, including counsel fees (A & M Exports v Meridien Intl. Bank, supra).
While there is no common-law or statutory cause of action for damages due to an improperly procured prehminary injunction, an undertaking such as the one at issue in the present case is the equivalent of a contract between the parties, and is a separate basis for liability (Honeywell, Inc. v Technical Bldg. Servs., 103 AD2d 433, 434). Here, the undertaking committed plaintiffs to paying all damages caused by the temporary restraining order, up to $50,000, if the order were found to have been “wrongful and without sufficient cause”. This condition was met when the restraining order was vacated and plaintiffs’ motion for an attachment was denied (see, Sunrise Plaza Assocs. v International Summit Equities Corp., 212 AD2d 690, 691).
Contrary to plaintiffs’ arguments, attorneys’ fees incurred in a successful effort to vacate a restraining order may be recoverable damages under CPLR 6315 (Hanley v Fox, 90 AD2d 662, 663). Lost interest on the funds that were restrained is also a proper element of damages covered by an undertaking in connection with a preliminary injunction (Matter of Sweets v Behrens, 118 Misc 2d 1062). However, the record is insufficient to determine defendants’ damages since the court engaged in no fact-finding on this issue. We therefore remand for a hearing. Concur — Sullivan, J. P., Rosenberger, Tom and Wallach, JJ.