
704 So.2d 621 (1997)
Barry BESS, Appellant,
v.
EAGLE CAPITAL, INC., a Florida corporation, and Patricia Ann Thomas Barsorian, d/b/a P.A.T. Realty and Management, Appellees.
No. 96-3275.
District Court of Appeal of Florida, Fourth District.
November 12, 1997.
Order Denying Rehearing January 21, 1998.
Daniel M. Landis of Tedesco & Landis, P.A., Boca Raton, for appellant.
Jeffrey B. Smith of Kelley, Herman & Mills, Fort Lauderdale, for appellee Eagle Capital, Inc.
Patricia Ann Thomas Barsorian, Pompano Beach, pro se.
*622 PER CURIAM.
The sole issue raised in this appeal is the propriety of the trial court's order granting a motion to dismiss. We find that the grounds upon which dismissal was sought are not properly raised or resolved on a motion to dismiss, and, thus, we reverse.
The origins of this appeal are traceable to a county court action initiated by appellee, Patricia Barsorian, against the appellant, Barry Bess, to recover unpaid real estate commissions. Barsorian ultimately obtained a default judgment as the result of the county court proceedings. Steps were then taken to levy upon Florida real property owned by Bess, a Michigan resident. In January of 1996, a sheriff's sale was held, and Eagle Capital, Inc. purchased Bess' real property for $2,000.
Thereafter, in March of 1996, Bess filed a complaint in a Florida circuit court seeking to set aside the sale on the grounds that the sale price was inadequate and that he had never received notice of the sheriff's sale. Less than one week after the filing of his complaint in circuit court, in the county court from which Barsorian's judgment had emanated, Bess filed a motion seeking to vacate the default judgment on the ground that he had not received notice of the hearing that had resulted in the default. The county court judge denied Bess' motion, and he appealed to the circuit court.
In the meantime, the action in the circuit court was ongoing. Ultimately, both Eagle Capital and Barsorian filed motions to dismiss the circuit court action on the ground that the circuit court action was an impermissible collateral attack on the county court judgment. As to Barsorian, the trial court granted the motion and dismissed the action with prejudice. That order is the subject of this appeal.
A motion to dismiss tests the legal sufficiency of the complaint. Thus, in ruling on a motion to dismiss, the court may not look beyond the four corners of the complaint itself. See Sigma Fin. Corp. v. Investment Loss Recovery Servs., Inc., 673 So.2d 572 (Fla. 4th DCA 1996); Bolz v. State Farm Mut. Auto. Ins. Co., 679 So.2d 836, 837 (Fla. 2d DCA 1996). Because of this limitation, generally, collateral estoppel is an affirmative defense which must be raised in an answer. See Palmer v. McCallion, 645 So.2d 131, 133 (Fla. 4th DCA 1994)("Res judicata and collateral estoppel are affirmative defenses that ordinarily must be pled in answer or similar pleading."). An exception is made, however, where the face of the complaint is sufficient to demonstrate the existence of the defense. See Duncan v. Prudential Ins. Co., 690 So.2d 687, 688 (Fla. 1st DCA 1997)(affirming dismissal on grounds of res judicata and estoppel by judgment where appellant had specifically incorporated into her complaint the previous proceedings); Bolz, 679 So.2d at 837 (stating "[A]lthough affirmative defenses can be raised in a motion to dismiss if the allegations of the complaint demonstrate their existence, the complaint in this case does not refer to the prior action.") (citation omitted); United Services Auto. Ass'n v. Selz, 637 So.2d 320 (Fla. 4th DCA 1994)(holding that collateral estoppel could not be raised on motion to dismiss where the defense did not appear from the face of the complaint).
In the instant case, Bess' amended complaint did not set forth sufficient allegations regarding the action in the county court to enable the trial judge to address the merits of Eagle Capital's and Barsorian's motions to dismiss, which essentially raised the affirmative defense of collateral estoppel. Moreover, the transcript of the hearing on the motions to dismiss indicates that references were made and reliance was placed upon events occurring in the county court action which were not included in the four corners of the complaint. These matters could not properly be raised or considered on a motion to dismiss. Accordingly, we reverse the order dismissing Barsorian from the action.
PARIENTE and STEVENSON, JJ., and MARRA, KENNETH A., Associate Judge, concur.

ON MOTION FOR REHEARING & CLARIFICATION
PER CURIAM.
The motion for rehearing is denied. We grant the motion for clarification, and *623 note that Florida law permits a litigant to seek to set aside a sheriff's sale by either a motion filed in the original proceeding or by the institution of a separate action. See, e.g., Duran v. John Stalder, Inc., 686 So.2d 627 (Fla. 5th DCA 1996)(appeal from trial court's order denying motion to set aside sheriff's sale); Demars v. Village of Sandalwood Lakes Homeowners Ass'n, 625 So.2d 1219 (Fla. 4th DCA 1993)(appeal from trial court's denial of motion to set aside judgment and sheriff's sale); Gibson v. Sampson, 353 So.2d 609 (Fla. 4th DCA 1977)(appeal from dismissal of husband's fourth amended complaint seeking to set aside a sheriff's sale); Balding v. Fleisher, 279 So.2d 883 (Fla. 3d DCA)(appellants brought separate action to set aside sheriff's sale), cert. denied, 285 So.2d 20 (Fla.1973); Ziemba v. Scott, 224 So.2d 451 (Fla. 4th DCA 1969)(appeal from trial court's denial of motion to set aside sheriff's sale). Therefore, to the extent that the trial court based its dismissal of the complaint in this case on appellees' legal argument that a litigant may not institute a separate proceeding to set aside a sheriff's sale, the dismissal was in error.
STEVENSON, J., and PARIENTE, BARBARA J. and MARRA, KENNETH A., Associate Judges, concur.
