¶1ON MOTION FOR REHEARING
¶2The appellant has moved for rehearing in this cause on the ground, inter alia, that this court’s affirmance of the trial court’s dismissal for lack of subject matter jurisdiction was erroneous for the reason that the real issue raised by the defense motion and argument below was res judicata, not subject matter jurisdiction. Res judicata is an affirmative defense and must be pled. See Fla.R.Civ.P. 1.110(d). Defenses not raised by a 1.140 motion or responsive pleading are deemed to be waived. See Fla.R.Civ.P. 1.140(b). In this case, res ju-dicata was not raised by the pleadings.
¶3The trial court granted the defendant’s motion to dismiss for lack of subject matter jurisdiction. The true issue, res judicata, could only be determined, prior to trial, pursuant to a motion for summary judgment supported by appropriate pleadings and proof. That was not the posture of this case before the trial court nor on this appeal. Accordingly, we grant rehearing, vacate our prior opinion herein, reverse the dismissal of counts two and three of plaintiff’s amended complaint and remand for further proceedings consistent with this opinion. We do not foreclose consideration by the trial court of any appropriate motion to amend. See Fla.R. Civ.P. 1.190.
¶4REVERSED and REMANDED.