In this case we hold that a defendant is entitled to recover her attorney’s fees as a prevailing party under subsection 57.105(7), Florida Statutes (2009), after the court granted a motion to dismiss a mortgage foreclosure action and dismissed the case without prejudice.
On June 30, 2009, Flagstar Bank sued Tatyana Nudel to foreclose a mortgage. According to the mortgage, Flagstar was defined as the “lender” which lent Nudel $220,000; Mortgage Electronic Registration Systems, Inc., (“MERS”) was the “mortgagee” under the instrument, acting as a “nominee” for Flagstar; and Nudel was the “[bjorrower.” Under section 22 of the mortgage, the “lender” Flagstar was entitled to reasonable attorney’s fees and costs in foreclosure proceedings. MERS assigned the mortgage to Flagstar on August 21, 2009.
Nudel moved to dismiss the complaint, arguing that Flagstar lacked standing because MERS did not assign the bank the mortgage until after the bank filed the complaint. See Fla. R. Civ. P. 1.140(b). The circuit court agreed, granted the motion, and dismissed the case without prejudice on March 29, 2010.1 Nudel moved for attorney’s fees and costs on April 15, relying in part on the attorney’s fee provision in the mortgage. The circuit court denied the motion for fees, accepting Flagstar’s argument that Nudel had waived entitlement to fees under Stockman v. Downs, 573 So.2d 835 (Fla.1991), and Sardon Foundation v. New Horizons Service Dogs, Inc., 852 So.2d 416 (Fla. 5th DCA 2003), because she had not sought attorney’s fees in her motion to dismiss.
Initially, we hold Nudel did not waive her entitlement to attorney’s fees. It was proper for her to seek attorney’s fees in a motion filed after the entry of the dismissal without prejudice, because she had not yet filed a responsive pleading. In Stockman, the supreme court set forth a general rule that attorney’s fee “must be pled” or else they are waived. 573 So.2d at 837-38. Green v. Sun Harbor Homeowner’s Ass’n, 730 So.2d 1261, 1263 (Fla.1998), explained that when the Supreme Court used the phrase “must be pled” in Stockman, it referred to pleadings as those defined in Florida Rule of Civil Procedure 1.100(a) — complaints, answers, and counterclaims. Because a motion to dismiss is not a pleading, Stockman does not require the movant to raise the attorney’s fee claim in the motion; rather, “a defendant’s claim for attorney fees is to be made either in the defendant’s motion to dismiss or by a separate motion which must be filed within thirty days following a dismissal of the action. If the claim is not made within this time period, the claim is waived.” Id. Nudel timely moved for attorney’s fees within thirty days of the dismissal, so she did not waive her claim.
Additionally, Nudel was entitled to recover her attorney’s fees. The mortgage between Nudel and Flagstar entitled Flagstar to reasonable attorney’s fees for enforcement. By operation of subsection 57.105(7), the contractual provision also allows attorney’s fees to Nudel if she is the prevailing party. See § 57.105(7) (“If a contract contains a provision allowing attorney’s fees to a party when he or she is required to take any action to enforce the contract, the court may also allow reason*1165able attorney’s fees to the other party when that party prevails in any action, whether as plaintiff or defendant, with respect to the contract.”).
Nudel is the prevailing party within the meaning of subsection 57.105(7). This court has held that a plaintiffs voluntary dismissal makes a defendant a “prevailing party” in the dismissed action even where the plaintiff refiles the case and prevails. In Alhambra Homeowners Ass’n v. Asad, 943 So.2d 316, 317-18 (Fla. 4th DCA 2006), an association sued some of its homeowners, but voluntarily dismissed its lawsuit without prejudice before a summary judgment hearing. The association subsequently re-filed the suit after unsuccessful mediation talks. Id. at 318. In the other, dismissed action, the homeowners moved for prevailing party attorney’s fees. Id. The circuit court found the homeowners to be the prevailing parties and awarded them fees. Id. Following Thornber v. City of Fort Walton Beach, 568 So.2d 914 (Fla.1990), this court affirmed. Id. at 318-20. We held that the homeowners were “entitled to recover attorney’s fees under a statute awarding fees to the prevailing party in litigation after the plaintiff took a voluntary dismissal without prejudice.” Id. at 317. This was so “even though the plaintiff subsequently refiled the identical lawsuit and ultimately prevailed.” Id.
For the purpose of determining a “prevailing party” under section 57.105(7), we see no reason to distinguish between a voluntary dismissal without prejudice and a court’s involuntary dismissal without prejudice. This same conclusion was reached in Bank of New York v. Williams, 979 So.2d 347 (Fla. 1st DCA 2008), where the first district affirmed an award of prevailing party attorney’s fees on facts similar to those in this case. There, the bank sued the defendant to foreclose a mortgage. Id. at 347. The defendant moved to dismiss because the bank failed to show that it owned the mortgage and promissory note and, thus, it lacked standing to sue. Id. The court dismissed a complaint and amended complaint without prejudice; “[w]hen the Bank declined to file a second amended complaint, the trial court dismissed the amended complaint with prejudice.” Id. The bank did not appeal this order, but instead instituted a new foreclosure action. Id. In the first action, the court awarded the defendant prevailing party attorney’s fees and costs. Id.
On appeal, the bank argued that, “because the same factual and legal issues raised in the dismissed action [were] also the subject of the new litigation, [the defendant] [could] [not] be the prevailing party.” Id. at 347-48. Relying on a voluntary dismissal without prejudice case, State ex rel. Marsh v. Doran, 958 So.2d 1082 (Fla. 1st DCA 2007), the first district rejected the bank’s argument. Id. at 348. “The refiling of the same suit after the voluntary dismissal does not alter the ap-pellees’ right to recover prevailing party attorney’s fees incurred in defense of the first suit.” Id. (quoting Doran, 958 So.2d at 1082 (citing, inter alia, Alhambra Homeowners Ass’n, 943 So.2d at 319)). Accordingly, the court held that the defendant was the prevailing party and affirmed her award. Id. We agree with Williams and conclude that Nudel was a prevailing party entitled to recover attorney’s fees.
Finally, we reject Flagstar’s argument of estoppel. Flagstar and Nudel were described as the “lender” and “borrower” respectively in the mortgage and they are bound by it. Flagstar may not seek affirmative relief under the mortgage and then take the position that provisions of the mortgage do not apply to it. See Ross v. Hacker, 284 So.2d 399 (Fla. 3d DCA 1973).
*1166 Reversed and remanded for further proceedings.
POLEN and DAMOORGIAN, JJ., concur.. We do not address the grounds for dismissal since Flagstar did not appeal that final order.